From 1eefd6301bc246d397cd9f1cfebee978fa4e92de Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 17 Apr 2013 23:20:31 +0200 Subject: PARALLACTION: Don't use an invalid array index. --- engines/parallaction/dialogue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 78cc23311f..06ffd0b89b 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -238,7 +238,7 @@ int16 DialogueManager::selectAnswerN() { _selection = _balloonMan->hitTestDialogueBalloon(_mousePos.x, _mousePos.y); - VisibleAnswer *oldAnswer = &_visAnswers[_oldSelection]; + VisibleAnswer *oldAnswer = (_oldSelection == NO_ANSWER_SELECTED) ? NULL : &_visAnswers[_oldSelection]; VisibleAnswer *answer = &_visAnswers[_selection]; if (_selection != _oldSelection) { -- cgit v1.2.3