Merge pull request #792 from devnexen/cl_parse_overflow_fix

CL_ParseEntityBits overflow warning fix
This commit is contained in:
Yamagi 2022-02-26 16:19:17 +01:00 committed by GitHub
commit fca041c3ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,7 @@ CL_ParseEntityBits(unsigned *bits)
/* count the bits for net profiling */
for (i = 0; i < 32; i++)
{
if (total & (1 << i))
if (total & (1u << i))
{
bitcounts[i]++;
}
@ -648,7 +648,7 @@ CL_ParsePlayerstate(frame_t *oldframe, frame_t *newframe)
for (i = 0; i < MAX_STATS; i++)
{
if (statbits & (1 << i))
if (statbits & (1u << i))
{
state->stats[i] = MSG_ReadShort(&net_message);
}