mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 23:41:48 +00:00
Check for out of range gametype on map change
(cherry picked from commit 9b96964cbbfc20565a8cfdb741f4927f36df7899)
This commit is contained in:
parent
05246f36a6
commit
401f30f27d
1 changed files with 3 additions and 1 deletions
|
@ -2778,7 +2778,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
|
||||
|
||||
if (!G_RaceGametype())
|
||||
|
|
Loading…
Reference in a new issue