mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 00:20:59 +00:00
Change shift expressions to unsigned types. Shifting signed values to
a result that is not representable has undefined behaviour.
This commit is contained in:
parent
7e2aa2c627
commit
ed1794fe17
6 changed files with 11 additions and 8 deletions
|
@ -140,7 +140,7 @@ void SV_GetChallenge(netadr_t from)
|
|||
}
|
||||
|
||||
// always generate a new challenge number, so the client cannot circumvent sv_maxping
|
||||
challenge->challenge = ( (rand() << 16) ^ rand() ) ^ svs.time;
|
||||
challenge->challenge = ( ((unsigned int)rand() << 16) ^ (unsigned int)rand() ) ^ svs.time;
|
||||
challenge->wasrefused = qfalse;
|
||||
challenge->time = svs.time;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue