diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/combat.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/interface.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index 6c293bc36d..6422b7284f 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -1116,7 +1116,7 @@ void Combat::setSpeedTable() { } if (hasSpeed) { - if (_speedTable[_whosSpeed] != oldSpeed) { + if (_whosSpeed >= (int)_speedTable.size() || _speedTable[_whosSpeed] != oldSpeed) { for (_whosSpeed = 0; _whosSpeed < (int)charSpeeds.size(); ++_whosSpeed) { if (oldSpeed == _speedTable[_whosSpeed]) break; diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index b994a99713..96f44bb690 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -267,7 +267,7 @@ void Interface::perform() { _buttonValue = 0; do { events.pollEventsAndWait(); - if (party._partyDead) + if (g_vm->shouldExit() || party._partyDead) return; if (events._leftButton && WAIT_BOUNDS.contains(events._mousePos)) |