diff options
-rw-r--r-- | engines/gob/game_v2.cpp | 2 | ||||
-rw-r--r-- | engines/gob/map.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index c85482fb6c..9dff07a6dd 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -282,7 +282,7 @@ void Game_v2::playTot(int16 skipPlay) { _vm->_inter->initControlVars(0); _vm->_scenery->_pCaptureCounter = oldCaptureCounter; _vm->_global->_inter_execPtr = (char *)_totFileData; - _vm->_global->_inter_execPtr += (int16) READ_LE_UINT16(_totFileData + (skipPlay << 1) + 0x66); + _vm->_global->_inter_execPtr += READ_LE_UINT16(_totFileData + (skipPlay << 1) + 0x66); _vm->_inter->callSub(2); if (_vm->_inter->_terminate != 0) _vm->_inter->_terminate = 2; diff --git a/engines/gob/map.cpp b/engines/gob/map.cpp index 4068850be1..b58ff5ec6a 100644 --- a/engines/gob/map.cpp +++ b/engines/gob/map.cpp @@ -258,7 +258,7 @@ int16 Map::checkDirectPath(Mult::Mult_Object *obj, int16 x0, int16 y0, int16 x1, if (obj->nearestWayPoint < obj->nearestDest) if (_wayPoints[obj->nearestWayPoint + 1].field_2 == 1) return 3; - if (_wayPoints[obj->nearestDest - 1].field_2 == 1) + if ((obj->nearestDest > 0) && (_wayPoints[obj->nearestDest - 1].field_2 == 1)) return 3; } |