aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-17 14:03:37 +0300
committerEugene Sandulenko2013-10-17 14:03:37 +0300
commit74172a7449f957cc7bc29741676a32b03c5eb756 (patch)
treebb293eece9f1c3622969db0f74ba51e2fc08ad54 /engines/draci
parent54ebfe7dded15261e7cb14f3bc234d8eb4feddae (diff)
downloadscummvm-rg350-74172a7449f957cc7bc29741676a32b03c5eb756.tar.gz
scummvm-rg350-74172a7449f957cc7bc29741676a32b03c5eb756.tar.bz2
scummvm-rg350-74172a7449f957cc7bc29741676a32b03c5eb756.zip
DRACI: Fix potential negative array index read. CID 1003548
Diffstat (limited to 'engines/draci')
-rw-r--r--engines/draci/game.cpp2
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;
}