mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 14:42:05 +08:00
engine: fix incompatible int size when casting pointer to int
This commit is contained in:
@@ -251,7 +251,7 @@ static void LZSS_BuildHash( lzss_state_t *state, const byte *source )
|
||||
{
|
||||
lzss_list_t *list;
|
||||
lzss_node_t *node;
|
||||
unsigned int targetindex = (uint)source & ( state->window_size - 1 );
|
||||
unsigned int targetindex = (uintptr_t)source & ( state->window_size - 1 );
|
||||
|
||||
node = &state->hash_node[targetindex];
|
||||
|
||||
|
||||
@@ -618,7 +618,7 @@ qboolean MSG_ReadBits( sizebuf_t *sb, void *pOutData, int nBits )
|
||||
int nBitsLeft = nBits;
|
||||
|
||||
// get output dword-aligned.
|
||||
while((( uint32_t )pOut & 3) != 0 && nBitsLeft >= 8 )
|
||||
while((( uintptr_t )pOut & 3) != 0 && nBitsLeft >= 8 )
|
||||
{
|
||||
*pOut = (byte)MSG_ReadUBitLong( sb, 8 );
|
||||
++pOut;
|
||||
|
||||
Reference in New Issue
Block a user