aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-07 18:24:43 -0400
committerPaul Gilbert2015-06-07 18:24:43 -0400
commite90c04b14f870ca6d36029b2e0769ab8e77f29b8 (patch)
treed4fb1aa4e4bcf8561c8a95b169bb45291370f75e
parente3d6b25d57fc1910a2217f693c0feabaf3fafd96 (diff)
downloadscummvm-rg350-e90c04b14f870ca6d36029b2e0769ab8e77f29b8.tar.gz
scummvm-rg350-e90c04b14f870ca6d36029b2e0769ab8e77f29b8.tar.bz2
scummvm-rg350-e90c04b14f870ca6d36029b2e0769ab8e77f29b8.zip
SHERLOCK: Fix Scalpel bug when picking up paper
-rw-r--r--engines/sherlock/objects.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index bdb554330a..a360f9abf9 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -260,7 +260,8 @@ void Sprite::adjustSprite() {
if (!map._active || (map._frameChangeFlag = !map._frameChangeFlag))
++_frameNumber;
- if (_walkSequences[_sequenceNumber][_frameNumber] == 0) {
+ if (_frameNumber >= _walkSequences[_sequenceNumber]._sequences.size() ||
+ _walkSequences[_sequenceNumber][_frameNumber] == 0) {
switch (_sequenceNumber) {
case Scalpel::STOP_UP:
case Scalpel::STOP_DOWN: