diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hugo/route.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 8ae5be10cd..070e952747 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -275,9 +275,10 @@ void Route::segment(int16 x, int16 y) { Point *Route::newNode() { debugC(1, kDebugRoute, "newNode"); + _routeListIndex++; if (_routeListIndex >= kMaxNodes) // Too many nodes return 0; // Incomplete route - failure - _routeListIndex++; + _route[_routeListIndex] = _route[_routeListIndex - 1]; // Initialize with previous node return &_route[_routeListIndex]; } |