diff options
author | Eugene Sandulenko | 2016-05-09 14:30:44 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-09 14:31:29 +0200 |
commit | 117111e7503deb02969f2f6eb85992548348ff00 (patch) | |
tree | 35e4a2da3dce9b1f3de25058eda52de7e6bc7164 /engines/sword2/screen.cpp | |
parent | 69120f4e72ea7e7a05bf02d4addf0dcfaaa5aabc (diff) | |
download | scummvm-rg350-117111e7503deb02969f2f6eb85992548348ff00.tar.gz scummvm-rg350-117111e7503deb02969f2f6eb85992548348ff00.tar.bz2 scummvm-rg350-117111e7503deb02969f2f6eb85992548348ff00.zip |
SWORD2: Fix potential buffer overrun
Diffstat (limited to 'engines/sword2/screen.cpp')
-rw-r--r-- | engines/sword2/screen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp index 0cb951fdfc..40baf67e46 100644 --- a/engines/sword2/screen.cpp +++ b/engines/sword2/screen.cpp @@ -1296,7 +1296,7 @@ void Screen::setPsxScrCache(byte *psxScrCache, uint8 level) { } byte *Screen::getPsxScrCache(uint8 level) { - if (level > 3) { + if (level > 2) { level = 0; } @@ -1307,7 +1307,7 @@ byte *Screen::getPsxScrCache(uint8 level) { } bool Screen::getPsxScrCacheStatus(uint8 level) { - if (level > 3) { + if (level > 2) { level = 0; } |