engine: server: fix signed integer overflow in challenge generator
This commit is contained in:
parent
767556ccad
commit
df23ddb545
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ static void SV_GetChallenge( netadr_t from )
|
|||
if( i == MAX_CHALLENGES )
|
||||
{
|
||||
// this is the first time this client has asked for a challenge
|
||||
svs.challenges[oldest].challenge = (COM_RandomLong( 0, 0xFFFF ) << 16) | COM_RandomLong( 0, 0xFFFF );
|
||||
svs.challenges[oldest].challenge = (COM_RandomLong( 0, 0x7FFF ) << 16) | COM_RandomLong( 0, 0xFFFF );
|
||||
svs.challenges[oldest].adr = from;
|
||||
svs.challenges[oldest].time = host.realtime;
|
||||
svs.challenges[oldest].connected = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue