Skip to content

Commit

Permalink
SHERLOCK: In startCAnim, check range before accessing sequence array
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jun 13, 2015
1 parent 5887d92 commit 09f7611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/sherlock/scalpel/scalpel_scene.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 09f7611

Please sign in to comment.