diff options
author | Matthew Hoops | 2010-02-10 17:46:22 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-02-10 17:46:22 +0000 |
commit | 7eb92eb1cd20789ee4450589afdeb66ac2f70c13 (patch) | |
tree | 03cbb585d875c68369c093f31fccdaef7cd1c1a7 | |
parent | c2c82b22da2a6c7e0f1528d10ac2349a9a5d6487 (diff) | |
download | scummvm-rg350-7eb92eb1cd20789ee4450589afdeb66ac2f70c13.tar.gz scummvm-rg350-7eb92eb1cd20789ee4450589afdeb66ac2f70c13.tar.bz2 scummvm-rg350-7eb92eb1cd20789ee4450589afdeb66ac2f70c13.zip |
Fix a potential problem for some compilers with having multiple stream reads.
svn-id: r48035
-rw-r--r-- | engines/mohawk/video/cinepak.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/mohawk/video/cinepak.cpp b/engines/mohawk/video/cinepak.cpp index 48883ceab9..2ffe6869ae 100644 --- a/engines/mohawk/video/cinepak.cpp +++ b/engines/mohawk/video/cinepak.cpp @@ -114,7 +114,10 @@ Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *strea if (stream->eos()) break; - uint32 chunkSize = (stream->readByte() << 16) + stream->readUint16BE() - 4; // 24bit + // Chunk Size is 24-bit, ignore the first 4 bytes + uint32 chunkSize = stream->readByte() << 16; + chunkSize += stream->readUint16BE() - 4; + int32 startPos = stream->pos(); switch (chunkID) { |