aboutsummaryrefslogtreecommitdiffstats
path: root/code/server
diff options
context:
space:
mode:
Diffstat (limited to 'code/server')
-rwxr-xr-xcode/server/sv_client.c10
-rwxr-xr-xcode/server/sv_game.c6
2 files changed, 10 insertions, 6 deletions
diff --git a/code/server/sv_client.c b/code/server/sv_client.c
index 1756bab..0b17fe5 100755
--- a/code/server/sv_client.c
+++ b/code/server/sv_client.c
@@ -239,7 +239,7 @@ void SV_DirectConnect( netadr_t from ) {
int challenge;
char *password;
int startIndex;
- char *denied;
+ int denied;
int count;
Com_DPrintf ("SVC_DirectConnect ()\n");
@@ -420,13 +420,13 @@ gotnewcl:
Q_strncpyz( newcl->userinfo, userinfo, sizeof(newcl->userinfo) );
// get the game a chance to reject this connection or modify the userinfo
- denied = (char *)VM_Call( gvm, GAME_CLIENT_CONNECT, clientNum, qtrue, qfalse ); // firstTime = qtrue
+ denied = VM_Call( gvm, GAME_CLIENT_CONNECT, clientNum, qtrue, qfalse ); // firstTime = qtrue
if ( denied ) {
// we can't just use VM_ArgPtr, because that is only valid inside a VM_Call
- denied = VM_ExplicitArgPtr( gvm, (int)denied );
+ char *str = VM_ExplicitArgPtr( gvm, denied );
- NET_OutOfBandPrint( NS_SERVER, from, "print\n%s\n", denied );
- Com_DPrintf ("Game rejected a connection: %s.\n", denied);
+ NET_OutOfBandPrint( NS_SERVER, from, "print\n%s\n", str );
+ Com_DPrintf ("Game rejected a connection: %s.\n", str);
return;
}
diff --git a/code/server/sv_game.c b/code/server/sv_game.c
index f99466d..387b1a8 100755
--- a/code/server/sv_game.c
+++ b/code/server/sv_game.c
@@ -828,7 +828,11 @@ int SV_GameSystemCalls( int *args ) {
return 0;
case TRAP_STRNCPY:
- return (int)strncpy( VMA(1), VMA(2), args[3] );
+#warning 64bit broken!
+// Com_Printf("%s:%d %s() *** return value of TRAP_STRNCPY not 64bit clean\n", __FILE__, __LINE__, __FUNCTION__);
+// Com_Printf("%s %d\n", VMA(2), args[3]);
+ strncpy( VMA(1), VMA(2), args[3] );
+ return 0;
case TRAP_SIN:
return FloatAsInt( sin( VMF(1) ) );