aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-12-10 22:28:59 -0500
committerPaul Gilbert2015-12-10 22:28:59 -0500
commite6f3b9d29f0fc695a616323be133f579c309388b (patch)
tree56b340631186ab30ede715f8280d1171adf23622 /engines
parentf857859041e15d36a88e7843d289024962ddb1b1 (diff)
downloadscummvm-rg350-e6f3b9d29f0fc695a616323be133f579c309388b.tar.gz
scummvm-rg350-e6f3b9d29f0fc695a616323be133f579c309388b.tar.bz2
scummvm-rg350-e6f3b9d29f0fc695a616323be133f579c309388b.zip
ACCESS: Workaround for bad floppy English anim for librarian
Diffstat (limited to 'engines')
-rw-r--r--engines/access/animation.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/access/animation.cpp b/engines/access/animation.cpp
index 14d7c0d4cc..259396f37e 100644
--- a/engines/access/animation.cpp
+++ b/engines/access/animation.cpp
@@ -53,6 +53,13 @@ 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)
+ return;
+
_scaling = stream->readSByte();
stream->readByte(); // unk
_frameNumber = stream->readByte();