diff options
| author | Martin Kiewitz | 2015-06-12 01:06:19 +0200 | 
|---|---|---|
| committer | Martin Kiewitz | 2015-06-12 01:06:19 +0200 | 
| commit | 16b65badc06b60d434f5f7bb0781b324f567e18c (patch) | |
| tree | 6c73d56efde2c33a8699104ce28ae3142601f948 /engines/sherlock | |
| parent | ead934ed81ede904cfc9ddb3551252231f19a786 (diff) | |
| download | scummvm-rg350-16b65badc06b60d434f5f7bb0781b324f567e18c.tar.gz scummvm-rg350-16b65badc06b60d434f5f7bb0781b324f567e18c.tar.bz2 scummvm-rg350-16b65badc06b60d434f5f7bb0781b324f567e18c.zip  | |
SHERLOCK: 3DO: cel decoder change
Diffstat (limited to 'engines/sherlock')
| -rw-r--r-- | engines/sherlock/image_file.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sherlock/image_file.cpp b/engines/sherlock/image_file.cpp index 3e11b09773..265be52253 100644 --- a/engines/sherlock/image_file.cpp +++ b/engines/sherlock/image_file.cpp @@ -348,6 +348,7 @@ static byte imagefile3DO_cel_bitsPerPixelLookupTable[8] = {  // Reads a 3DO .cel/.anim file  void ImageFile3DO::load3DOCelFile(Common::SeekableReadStream &stream) { +	int32  streamSize = stream.size();  	int32  chunkStartPos = 0;  	uint32 chunkTag = 0;  	uint32 chunkSize = 0; @@ -379,7 +380,7 @@ void ImageFile3DO::load3DOCelFile(Common::SeekableReadStream &stream) {  	memset(&plutRGBlookupTable, 0, sizeof(plutRGBlookupTable)); -	while (!stream.err() && !stream.eos()) { +	while (!stream.err() && (stream.pos() < streamSize)) {  		chunkStartPos = stream.pos();  		chunkTag = stream.readUint32BE();  		chunkSize = stream.readUint32BE();  | 
