Update Cheats.cpp

Bounds checking again.
This commit is contained in:
Christopher Snowhill 2016-11-04 11:59:03 -07:00 committed by GitHub
parent ecc6f7c3c6
commit 6cc2db09ab
1 changed files with 3 additions and 0 deletions

View File

@ -2580,6 +2580,9 @@ void cheatsReadGame(gzFile file, int version)
cheatsNumber = utilReadInt(file);
if (cheatsNumber > MAX_CHEATS)
cheatsNumber = MAX_CHEATS;
if (version > 8)
utilGzRead(file, cheatsList, sizeof(cheatsList));