Print net checksums as unsigned int

because it actually *is* unsigned and the negative values look strange
This commit is contained in:
Daniel Gibson 2013-03-16 00:35:03 +01:00
parent e8c8a04c07
commit 6e6703b93f
2 changed files with 4 additions and 4 deletions

View file

@ -1576,7 +1576,7 @@ void idLobby::SendConnectionRequest()
// Add the current version info to the handshake
const unsigned int localChecksum = NetGetVersionChecksum(); // DG: use int instead of long for 64bit compatibility
NET_VERBOSE_PRINT( "NET: version = %i\n", localChecksum );
NET_VERBOSE_PRINT( "NET: version = %u\n", localChecksum );
msg.WriteLong( localChecksum );
msg.WriteUShort( peers[host].sessionID );
@ -1761,7 +1761,7 @@ bool idLobby::CheckVersion( idBitMsg& msg, lobbyAddress_t peerAddress )
{
const unsigned int localChecksum = NetGetVersionChecksum(); // DG: use int instead of long for 64bit compatibility
NET_VERBOSE_PRINT( "NET: Comparing handshake version - localChecksum = %i, remoteChecksum = %i\n", localChecksum, remoteChecksum );
NET_VERBOSE_PRINT( "NET: Comparing handshake version - localChecksum = %u, remoteChecksum = %u\n", localChecksum, remoteChecksum );
return ( remoteChecksum == localChecksum );
}
return true;

View file

@ -110,7 +110,7 @@ unsigned int NetGetVersionChecksum()
CRC32_FinishChecksum( ret );
NET_VERBOSE_PRINT( "NetGetVersionChecksum - string : %s\n", netVersion.string );
NET_VERBOSE_PRINT( "NetGetVersionChecksum - checksum : %i\n", ret );
NET_VERBOSE_PRINT( "NetGetVersionChecksum - checksum : %u\n", ret );
return ret;
#endif
}
@ -4593,7 +4593,7 @@ void idSessionLocal::ListServersCommon()
// Add the current version info to the query
const unsigned int localChecksum = NetGetVersionChecksum(); // DG: use int instead of long for 64bit compatibility
NET_VERBOSE_PRINT( "ListServers: Hash checksum: %i, broadcasting to: %s\n", localChecksum, address.ToString() );
NET_VERBOSE_PRINT( "ListServers: Hash checksum: %u, broadcasting to: %s\n", localChecksum, address.ToString() );
msg.WriteLong( localChecksum );