diff options
author | Torbjörn Andersson | 2008-09-29 20:40:58 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2008-09-29 20:40:58 +0000 |
commit | 8fc8531f70dbccb963823392ae923e89666839bb (patch) | |
tree | 1182a22a231dd0e6143a2fcba35c13ebd236c787 /engines | |
parent | 579b4b55c86c1933442f484bafb3fbb0a32e9a37 (diff) | |
download | scummvm-rg350-8fc8531f70dbccb963823392ae923e89666839bb.tar.gz scummvm-rg350-8fc8531f70dbccb963823392ae923e89666839bb.tar.bz2 scummvm-rg350-8fc8531f70dbccb963823392ae923e89666839bb.zip |
Since no one has come up with any better suggestion... this should fix #2123258
("COMI: Crash after video (SAN) play"). The eos() function won't return true
until we've tried to read *past* the end of the stream.
svn-id: r34689
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 6b79b7e2c4..3b17f3ae10 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -1017,16 +1017,17 @@ void SmushPlayer::parseNextFrame() { } assert(_base); + + const uint32 subType = _base->readUint32BE(); + const int32 subSize = _base->readUint32BE(); + const int32 subOffset = _base->pos(); + if (_base->eos()) { _vm->_smushVideoShouldFinish = true; _endOfFile = true; return; } - const uint32 subType = _base->readUint32BE(); - const int32 subSize = _base->readUint32BE(); - const int32 subOffset = _base->pos(); - switch (subType) { case MKID_BE('AHDR'): // FT INSANE may seek file to the beginning handleAnimHeader(subSize, *_base); |