aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorStrangerke2015-06-13 08:09:38 +0200
committerStrangerke2015-06-13 08:09:38 +0200
commit09f7611651aee01c7ab8d212123fd6b4deb30d45 (patch)
treef5b041c7f37ea1ff1f128b900b2d5a81eb6b7b94 /engines/sherlock
parent5887d92d17729adfa11b2bb58cb8692507afb886 (diff)
downloadscummvm-rg350-09f7611651aee01c7ab8d212123fd6b4deb30d45.tar.gz
scummvm-rg350-09f7611651aee01c7ab8d212123fd6b4deb30d45.tar.bz2
scummvm-rg350-09f7611651aee01c7ab8d212123fd6b4deb30d45.zip
SHERLOCK: In startCAnim, check range before accessing sequence array
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/scalpel/scalpel_scene.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sherlock/scalpel/scalpel_scene.cpp b/engines/sherlock/scalpel/scalpel_scene.cpp
index 87fe208520..813e4188ae 100644
--- a/engines/sherlock/scalpel/scalpel_scene.cpp
+++ b/engines/sherlock/scalpel/scalpel_scene.cpp
@@ -590,7 +590,7 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) {
if (playRate < 0) {
// Reverse direction
// Count number of frames
- while (cObj._sequences[frames] && frames < MAX_FRAME)
+ while (frames < MAX_FRAME && cObj._sequences[frames])
++frames;
} else {
// Forward direction