diff options
author | Paul Gilbert | 2018-03-31 22:29:15 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-31 22:29:15 -0400 |
commit | 68365f3c5484d3d28ed900f301da97a71d8c0a84 (patch) | |
tree | 731f63928754f772a30c1be007d8df3f121ad089 | |
parent | 27bbc7e5a98e34a7fefcfc25ed33863a06103c2a (diff) | |
download | scummvm-rg350-68365f3c5484d3d28ed900f301da97a71d8c0a84.tar.gz scummvm-rg350-68365f3c5484d3d28ed900f301da97a71d8c0a84.tar.bz2 scummvm-rg350-68365f3c5484d3d28ed900f301da97a71d8c0a84.zip |
XEEN: Fix crash escaping Cast Spell dialog during combat
-rw-r--r-- | engines/xeen/interface.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 810bfd64cf..8e973f793e 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -103,6 +103,7 @@ void PartyDrawer::drawParty(bool updateFlag) { void PartyDrawer::highlightChar(int charId) { Resources &res = *_vm->_resources; Windows &windows = *_vm->_windows; + assert(charId < MAX_ACTIVE_PARTY); if (charId != _hiliteChar && _hiliteChar != HILIGHT_CHAR_DISABLED) { // Handle deselecting any previusly selected char @@ -1567,7 +1568,7 @@ void Interface::doCombat() { spells.castSpell(c, (MagicSpell)spellId); nextChar(); } else { - highlightChar(combat._combatParty[combat._whosTurn]->_rosterId); + highlightChar(combat._whosTurn); } break; } |