diff options
Diffstat (limited to 'engines/scumm/smush/smush_player.cpp')
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index b663c707dd..be67728327 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -985,7 +985,7 @@ void SmushPlayer::parseNextFrame() { error("SmushPlayer: Unable to open file %s", _seekFile.c_str()); _base = tmp; _base->readUint32BE(); - _base->readUint32BE(); + _baseSize = _base->readUint32BE(); if (_seekPos > 0) { assert(_seekPos > 8); @@ -1023,12 +1023,14 @@ void SmushPlayer::parseNextFrame() { const int32 subSize = _base->readUint32BE(); const int32 subOffset = _base->pos(); - if (_base->eos()) { + if (_base->pos() >= _baseSize) { _vm->_smushVideoShouldFinish = true; _endOfFile = true; return; } + debug(3, "Chunk: %s at %x", Common::tag2string(subType).c_str(), subOffset); + switch (subType) { case MKID_BE('AHDR'): // FT INSANE may seek file to the beginning handleAnimHeader(subSize, *_base); @@ -1037,7 +1039,7 @@ void SmushPlayer::parseNextFrame() { handleFrame(subSize, *_base); break; default: - error("Unknown Chunk found at %x: %x, %d", subOffset, subType, subSize); + error("Unknown Chunk found at %x: %s, %d", subOffset, Common::tag2string(subType).c_str(), subSize); } _base->seek(subOffset + subSize, SEEK_SET); |