From 74172a7449f957cc7bc29741676a32b03c5eb756 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 17 Oct 2013 14:03:37 +0300 Subject: DRACI: Fix potential negative array index read. CID 1003548 --- engines/draci/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/draci/game.cpp') 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; } -- cgit v1.2.3