Ludwig's 1st diff: Some 64bit fixes for x86_64. Also fixes Makefile build.

This commit is contained in:
Zachary Slater 2005-08-27 02:24:00 +00:00
parent 59cce31e75
commit f46ede91fb
23 changed files with 150 additions and 84 deletions

View file

@ -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;
}

View file

@ -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) ) );