diff options
-rw-r--r-- | engines/xeen/dialogs/dialogs_spells.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp index c17859cf79..abb2478587 100644 --- a/engines/xeen/dialogs/dialogs_spells.cpp +++ b/engines/xeen/dialogs/dialogs_spells.cpp @@ -342,7 +342,7 @@ const char *SpellsDialog::setSpellText(Character *c, int mode) { if (c->getMaxSP() == 0) { return Res.NOT_A_SPELL_CASTER; } else { - for (int spellIndex = 0; spellIndex < SPELLS_PER_CLASS; ++spellIndex) { + for (int spellIndex = 0; spellIndex < CHAR_MAX_SPELLS; ++spellIndex) { if (c->_spells[spellIndex]) { int spellId = Res.SPELLS_ALLOWED[category][spellIndex]; int gemCost = Res.SPELL_GEM_COST[spellId]; |