Skip to content

Commit

Permalink
XEEN: Fix crash setting up combat speed table for new games
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Mar 17, 2018
1 parent 637dede commit 902c984
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engines/xeen/combat.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion engines/xeen/interface.cpp
Expand Up @@ -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))
Expand Down

0 comments on commit 902c984

Please sign in to comment.