From cbd9963af7f157e70182a8fd40ab2ffac1194449 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Tue, 20 Nov 2007 21:00:41 +0000 Subject: fix bug #1834852 svn-id: r29586 --- engines/touche/touche.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index bb02b7e58c..935a528e70 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -3049,7 +3049,7 @@ void ToucheEngine::buildWalkPath(int dstPosX, int dstPosY, int keyChar) { } } key->prevWalkDataNum = minWalkDataNum; - if (key->walkDataNum == key->prevWalkDataNum && key->walkPointsList[1] == -1) { + if (key->walkDataNum == key->prevWalkDataNum && key->walkPointsList[1] == -1 && minWalkDataNum != -1) { if (key->walkPointsList[0] == _programWalkTable[minWalkDataNum].point1 || key->walkPointsList[0] == _programWalkTable[minWalkDataNum].point2) { ++key->walkPointsListIndex; } -- cgit v1.2.3