diff --git a/Source/control.cpp b/Source/control.cpp index a3192021b..918a915d7 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -226,15 +226,15 @@ void SetSpellTrans(char t) */ void DrawSpell() { - char spl, st; - int tlvl; + char st; + int spl, tlvl; spl = plr[myplr]._pRSpell; st = plr[myplr]._pRSplType; - // BUGFIX: Move the next line into the if statement to avoid OOB (SPL_INVALID is -1) - tlvl = plr[myplr]._pISplLvlAdd + plr[myplr]._pSplLvl[spl]; + // BUGFIX: Move the next line into the if statement to avoid OOB (SPL_INVALID is -1) (fixed) if (st == RSPLTYPE_SPELL && spl != SPL_INVALID) { + tlvl = plr[myplr]._pISplLvlAdd + plr[myplr]._pSplLvl[spl]; if (!CheckSpell(myplr, spl, RSPLTYPE_SPELL, TRUE)) st = RSPLTYPE_INVALID; if (tlvl <= 0)