Fixed STRNCPY system calls.

This commit is contained in:
Artem Kharytoniuk 2016-06-24 00:04:50 +03:00
parent 9d1a9107a7
commit 89da951f57
3 changed files with 6 additions and 3 deletions

View File

@ -623,7 +623,8 @@ int CL_CgameSystemCalls( int *args ) {
Com_Memcpy( VMA(1), VMA(2), args[3] );
return 0;
case CG_STRNCPY:
return (int)strncpy( VMA(1), VMA(2), args[3] );
strncpy( VMA(1), VMA(2), args[3] );
return args[1];
case CG_SIN:
return FloatAsInt( sin( VMF(1) ) );
case CG_COS:

View File

@ -1043,7 +1043,8 @@ int CL_UISystemCalls( int *args ) {
return 0;
case UI_STRNCPY:
return (int)strncpy( VMA(1), VMA(2), args[3] );
strncpy( VMA(1), VMA(2), args[3] );
return args[1];
case UI_SIN:
return FloatAsInt( sin( VMF(1) ) );

View File

@ -828,7 +828,8 @@ int SV_GameSystemCalls( int *args ) {
return 0;
case TRAP_STRNCPY:
return (int)strncpy( VMA(1), VMA(2), args[3] );
strncpy( VMA(1), VMA(2), args[3] );
return args[1];
case TRAP_SIN:
return FloatAsInt( sin( VMF(1) ) );