mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Got_Cheat/CHEAT_GIVEPOWERUP: avoid reading out of bounds
This commit is contained in:
parent
b323c6bdb7
commit
4576956ca6
1 changed files with 2 additions and 0 deletions
|
|
@ -6069,6 +6069,8 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum)
|
|||
UINT8 powerup = READUINT8(*cp);
|
||||
UINT16 time = READUINT16(*cp);
|
||||
|
||||
powerup = min(powerup, LASTPOWERUP);
|
||||
|
||||
// FIXME: we should have actual KITEM_ name array
|
||||
const char *powerupname = cv_kartdebugitem.PossibleValue[
|
||||
1 + NUMKARTITEMS + (powerup - FIRSTPOWERUP)].strvalue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue