[Scummvm-cvs-logs] scummvm master -> 331a9f49690f59df207b437d36f5147a4e8dbf29

dreammaster dreammaster at scummvm.org
Fri Feb 5 00:47:42 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
331a9f4969 SHERLOCK: SS: Fix crash on invalid graphics in German version


Commit: 331a9f49690f59df207b437d36f5147a4e8dbf29
    https://github.com/scummvm/scummvm/commit/331a9f49690f59df207b437d36f5147a4e8dbf29
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-02-04T18:47:08-05:00

Commit Message:
SHERLOCK: SS: Fix crash on invalid graphics in German version

Changed paths:
    engines/sherlock/image_file.cpp



diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp
index 971980a..1247a7f 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);






More information about the Scummvm-git-logs mailing list