diff options
author | Eugene Sandulenko | 2011-11-02 23:58:29 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2011-11-02 23:58:29 +0000 |
commit | a95820956e046c13249bc75f6e1fa26bcddc9d52 (patch) | |
tree | 164d9c197bccd219e43467e626bb6fa8743f983f /engines | |
parent | 3bd615ae9b78ded9a51b7320a602f1c46c9f57ef (diff) | |
download | scummvm-rg350-a95820956e046c13249bc75f6e1fa26bcddc9d52.tar.gz scummvm-rg350-a95820956e046c13249bc75f6e1fa26bcddc9d52.tar.bz2 scummvm-rg350-a95820956e046c13249bc75f6e1fa26bcddc9d52.zip |
CGE: Fix array bounds check
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/snail.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp index cbc463ced2..5ab8f6314b 100644 --- a/engines/cge/snail.cpp +++ b/engines/cge/snail.cpp @@ -406,7 +406,7 @@ void CGEEngine::snGame(Sprite *spr, int num) { Stage++; if (hand && Stage > kDressed) ++hand; - if (i >= 0 || (dup[i] == spr && newRandom(3) == 0)) { + if (i >= 0 && (dup[i] == spr && newRandom(3) == 0)) { _commandHandler->addCommand(kCmdSeq, -1, 3, dup[0]); // Yes _commandHandler->addCommand(kCmdSeq, -1, 3, dup[1]); // Yes _commandHandler->addCommand(kCmdSeq, -1, 3, dup[2]); // Yes |