mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
engine: fixup endianness found by -Werror=strict-aliasing in old armv7hf compiler (d259421111289af3b49c055150e02213f39075a6)
This commit is contained in:
parent
b9ca0d4563
commit
3ac8ad9484
@ -2247,11 +2247,13 @@ void CL_ReadNetMessage( void )
|
||||
|
||||
while( CL_GetMessage( net_message_buffer, &curSize ))
|
||||
{
|
||||
const int split_header = 0xFFFFFFFE;
|
||||
const int split_header = LittleLong( 0xFFFFFFFE );
|
||||
if( cls.legacymode && !memcmp( &split_header, net_message_buffer, sizeof( split_header )))
|
||||
{
|
||||
// Will rewrite existing packet by merged
|
||||
if( !NetSplit_GetLong( &cls.netchan.netsplit, &net_from, net_message_buffer, &curSize ) )
|
||||
continue;
|
||||
}
|
||||
|
||||
MSG_Init( &net_message, "ServerData", net_message_buffer, curSize );
|
||||
|
||||
|
@ -1535,6 +1535,7 @@ void CL_SendConsistencyInfo( sizebuf_t *msg )
|
||||
case force_exactfile:
|
||||
MD5_HashFile( md5, filename, NULL );
|
||||
memcpy( &pc->value, md5, sizeof( pc->value ));
|
||||
LittleLongSW( pc->value );
|
||||
|
||||
if( user_changed_diskfile )
|
||||
MSG_WriteUBitLong( msg, 0, 32 );
|
||||
|
@ -121,8 +121,10 @@ void SV_ParseConsistencyResponse( sv_client_t *cl, sizebuf_t *msg )
|
||||
{
|
||||
value = MSG_ReadUBitLong( msg, 32 );
|
||||
|
||||
LittleLongSW( value );
|
||||
|
||||
// will be compare only first 4 bytes
|
||||
if( memcmp( &value , r->rgucMD5_hash, 4 ))
|
||||
if( memcmp( &value, r->rgucMD5_hash, 4 ))
|
||||
badresindex = idx + 1;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user