Explorar o código

Fixed CID 1366333

AlexVinS %!s(int64=9) %!d(string=hai) anos
pai
achega
121dd6c63a
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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;