mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
DRACI: Fix potential negative array index read. CID 1003548
This commit is contained in:
parent
54ebfe7dde
commit
74172a7449
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user