mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
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.
This commit is contained in:
parent
5df022d75b
commit
8d62faf619
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user