diff options
Diffstat (limited to 'engines/xeen/interface.cpp')
-rw-r--r-- | engines/xeen/interface.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 7efc7a7068..0c7f15dc5f 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -527,8 +527,10 @@ void Interface::perform() { } int result = 0; + Character *c = &party._activeParty[(spells._lastCaster < 0 || + spells._lastCaster >= (int)party._activeParty.size()) ? + (int)party._activeParty.size() - 1 : spells._lastCaster]; do { - Character *c = nullptr; int spellId = CastSpell::show(_vm, c, _vm->_mode); if (spellId == -1 || c == nullptr) break; |