| CODENOTIFIER | HelpYou are not signed inSign in |
Project: ScummVM
Revision: 34689
Author: eriktorbjorn
Date: 29 Sep 2008 16:40:58
Changes: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.
| ... | ...@@ -1017,16 +1017,17 @@ | |
| 1017 | 1017 | } |
| 1018 | 1018 | |
| 1019 | 1019 | assert(_base); |
| 1020 | ||
| 1021 | const uint32 subType = _base->readUint32BE(); | |
| 1022 | const int32 subSize = _base->readUint32BE(); | |
| 1023 | const int32 subOffset = _base->pos(); | |
| 1024 | ||
| 1020 | 1025 | if (_base->eos()) { |
| 1021 | 1026 | _vm->_smushVideoShouldFinish = true; |
| 1022 | 1027 | _endOfFile = true; |
| 1023 | 1028 | return; |
| 1024 | 1029 | } |
| 1025 | 1030 | |
| 1026 | const uint32 subType = _base->readUint32BE(); | |
| 1027 | const int32 subSize = _base->readUint32BE(); | |
| 1028 | const int32 subOffset = _base->pos(); | |
| 1029 | ||
| 1030 | 1031 | switch (subType) { |
| 1031 | 1032 | case MKID_BE('AHDR'): // FT INSANE may seek file to the beginning |
| 1032 | 1033 | handleAnimHeader(subSize, *_base); |