Browse Source

Fixed CID 1366333

AlexVinS 9 years ago
parent
commit
121dd6c63a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lib/CBattleCallback.cpp

+ 4 - 0
lib/CBattleCallback.cpp

@@ -1715,6 +1715,10 @@ ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastThisSpell
 	}
 	const PlayerColor player = caster->getOwner();
 	const ui8 side = playerToSide(player);
+
+	if((si8)side < 0)
+		return ESpellCastProblem::INVALID;
+
 	if(!battleDoWeKnowAbout(side))
 		return ESpellCastProblem::INVALID;