diff options
author | Paul Gilbert | 2016-02-04 18:47:08 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-02-04 18:47:08 -0500 |
commit | 331a9f49690f59df207b437d36f5147a4e8dbf29 (patch) | |
tree | 0e6468232e7e14905dc19a577fc39e4772fb731f /engines/sherlock | |
parent | 72a3cae20b081c28f9b55b3d1440739d6aa2e4e1 (diff) | |
download | scummvm-rg350-331a9f49690f59df207b437d36f5147a4e8dbf29.tar.gz scummvm-rg350-331a9f49690f59df207b437d36f5147a4e8dbf29.tar.bz2 scummvm-rg350-331a9f49690f59df207b437d36f5147a4e8dbf29.zip |
SHERLOCK: SS: Fix crash on invalid graphics in German version
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/image_file.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp index 971980a2ac..1247a7f8d0 100644 --- a/engines/sherlock/image_file.cpp +++ b/engines/sherlock/image_file.cpp @@ -172,7 +172,7 @@ void ImageFrame::decompressFrame(const byte *src, bool isRoseTattoo) { while (frameSize > 0) { if (*src == _rleMarker) { byte rleColor = src[1]; - byte rleCount = src[2]; + byte rleCount = MIN((int)src[2], frameSize); src += 3; frameSize -= rleCount; while (rleCount--) @@ -182,7 +182,6 @@ void ImageFrame::decompressFrame(const byte *src, bool isRoseTattoo) { --frameSize; } } - assert(frameSize == 0); } else { // Uncompressed frame Common::copy(src, src + _width * _height, dest); |