diff options
-rw-r--r-- | engines/touche/touche.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |