diff options
author | Eugene Sandulenko | 2013-10-18 15:56:50 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-18 15:56:50 +0300 |
commit | 834ff819df5ec4b17989dfdf325e428a46ca5d02 (patch) | |
tree | cf60fce417d8984caa6c38c2db52e7092876a038 /engines/draci | |
parent | 8390e53fc03fcbaa89c6a89a6573806f6563f102 (diff) | |
download | scummvm-rg350-834ff819df5ec4b17989dfdf325e428a46ca5d02.tar.gz scummvm-rg350-834ff819df5ec4b17989dfdf325e428a46ca5d02.tar.bz2 scummvm-rg350-834ff819df5ec4b17989dfdf325e428a46ca5d02.zip |
DRACI: Fix negative array index read. CID 1003548
Diffstat (limited to 'engines/draci')
-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 271eb1e02e..ff5bcefc93 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -981,7 +981,7 @@ void Game::dialogueMenu(int dialogueID) { debugC(7, kDraciLogicDebugLevel, "hit: %d, _lines[hit]: %d, lastblock: %d, dialogueLines: %d, dialogueExit: %d", - hit, _lines[hit], _lastBlock, _dialogueLinesNum, _dialogueExit); + hit, (hit >= 0 ? _lines[hit] : -1), _lastBlock, _dialogueLinesNum, _dialogueExit); if ((!_dialogueExit) && (hit >= 0) && (_lines[hit] != -1)) { if ((oldLines == 1) && (_dialogueLinesNum == 1) && (_lines[hit] == _lastBlock)) { |