mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-30 03:32:58 +00:00
Check for out of range gametype on map change
This commit is contained in:
parent
1eedb7d656
commit
edea7b2a10
1 changed files with 3 additions and 1 deletions
|
|
@ -2054,7 +2054,9 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
lastgametype = gametype;
|
||||
gametype = READUINT8(*cp);
|
||||
|
||||
if (gametype != lastgametype)
|
||||
if (gametype < 0 || gametype >= NUMGAMETYPES)
|
||||
gametype = lastgametype;
|
||||
else if (gametype != lastgametype)
|
||||
D_GameTypeChanged(lastgametype); // emulate consvar_t behavior for gametype
|
||||
|
||||
skipprecutscene = ((flags & (1<<2)) != 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue