[Scummvm-cvs-logs] scummvm master -> 8d62faf6193d3b2abe88a57062585b6f30330e9c
eriktorbjorn
eriktorbjorn at telia.com
Fri Jun 12 00:21:16 CEST 2015
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:
8d62faf619 SHERLOCK: Fix two Valgrind warnings in the 3DO image decoder
Commit: 8d62faf6193d3b2abe88a57062585b6f30330e9c
https://github.com/scummvm/scummvm/commit/8d62faf6193d3b2abe88a57062585b6f30330e9c
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-06-12T00:17:24+02:00
Commit Message:
SHERLOCK: Fix two Valgrind warnings in the 3DO image decoder
The 3DO Serrated Scalpel intro now runs without any Valgrind
warnings, up to the point where it should be showing the credits.
Changed paths:
engines/sherlock/image_file.cpp
diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp
index 56e0e08..3e11b09 100644
--- a/engines/sherlock/image_file.cpp
+++ b/engines/sherlock/image_file.cpp
@@ -384,14 +384,14 @@ void ImageFile3DO::load3DOCelFile(Common::SeekableReadStream &stream) {
chunkTag = stream.readUint32BE();
chunkSize = stream.readUint32BE();
+ if (stream.eos() || stream.err())
+ break;
+
if (chunkSize < 8)
error("load3DOCelFile: Invalid chunk size");
uint32 dataSize = chunkSize - 8;
- if (stream.eos() || stream.err())
- break;
-
switch (chunkTag) {
case MKTAG('A', 'N', 'I', 'M'):
// animation header
@@ -636,7 +636,10 @@ inline uint16 ImageFile3DO::celGetBits(const byte *&dataPtr, byte bitCount, byte
// Go to next byte
dataPtr++;
- currentByte = *dataPtr; dataBitsLeft = 8;
+ dataBitsLeft = 8;
+ if (resultBitsLeft) {
+ currentByte = *dataPtr;
+ }
}
}
return result;
More information about the Scummvm-git-logs
mailing list