diff options
author | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-26 19:48:14 -0400 |
commit | 504cf6ecb688a3f1c65a857bffd527d8b0e6ba63 (patch) | |
tree | 0c0d96d4061c11850c851f0fc981c75a58c20515 /engines/access/animation.cpp | |
parent | d8c28d15ae553d047b7e571f98727fa79ee143f3 (diff) | |
parent | e19922d181e775791f9105b8be7ff410770ede51 (diff) | |
download | scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.gz scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.tar.bz2 scummvm-rg350-504cf6ecb688a3f1c65a857bffd527d8b0e6ba63.zip |
Merge branch 'master' into xeen
Diffstat (limited to 'engines/access/animation.cpp')
-rw-r--r-- | engines/access/animation.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/access/animation.cpp b/engines/access/animation.cpp index 14d7c0d4cc..22de0fcb60 100644 --- a/engines/access/animation.cpp +++ b/engines/access/animation.cpp @@ -53,6 +53,18 @@ Animation::Animation(AccessEngine *vm, Common::SeekableReadStream *stream) : Man uint32 startOfs = stream->pos(); _type = stream->readByte(); + + // WORKAROUND: In Amazon floppy English, there's an animation associated with + // the librarian that isn't used, and has junk data. Luckily, it's animation + // type is also invalid, so if the _type isn't in range, exit immediately + if (_type < 0 || _type > 7) { + _scaling = -1; + _frameNumber = -1; + _initialTicks = _countdownTicks = 0; + _loopCount = _currentLoopCount = 0; + return; + } + _scaling = stream->readSByte(); stream->readByte(); // unk _frameNumber = stream->readByte(); |