diff options
author | Eugene Sandulenko | 2013-10-17 14:03:37 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-17 14:03:37 +0300 |
commit | 74172a7449f957cc7bc29741676a32b03c5eb756 (patch) | |
tree | bb293eece9f1c3622969db0f74ba51e2fc08ad54 | |
parent | 54ebfe7dded15261e7cb14f3bc234d8eb4feddae (diff) | |
download | scummvm-rg350-74172a7449f957cc7bc29741676a32b03c5eb756.tar.gz scummvm-rg350-74172a7449f957cc7bc29741676a32b03c5eb756.tar.bz2 scummvm-rg350-74172a7449f957cc7bc29741676a32b03c5eb756.zip |
DRACI: Fix potential negative array index read. CID 1003548
-rw-r--r-- | engines/draci/game.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index c4108cc0c7..8fb6f4b90f 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -953,7 +953,7 @@ void Game::dialogueMenu(int dialogueID) { "hit: %d, _lines[hit]: %d, lastblock: %d, dialogueLines: %d, dialogueExit: %d", hit, _lines[hit], _lastBlock, _dialogueLinesNum, _dialogueExit); - if ((!_dialogueExit) && (hit != -1) && (_lines[hit] != -1)) { + if ((!_dialogueExit) && (hit >= 0) && (_lines[hit] != -1)) { if ((oldLines == 1) && (_dialogueLinesNum == 1) && (_lines[hit] == _lastBlock)) { break; } |