Explorar el Código

Fixed CID 1366332

AlexVinS hace 9 años
padre
commit
c9e564bed8
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      lib/CBattleCallback.cpp

+ 2 - 0
lib/CBattleCallback.cpp

@@ -357,6 +357,8 @@ ESpellCastProblem::ESpellCastProblem CBattleInfoCallback::battleCanCastSpell(con
 	}
 	const PlayerColor player = caster->getOwner();
 	const ui8 side = playerToSide(player);
+	if((si8)side < 0)
+		return ESpellCastProblem::INVALID;
 	if(!battleDoWeKnowAbout(side))
 	{
 		logGlobal->warnStream() << "You can't check if enemy can cast given spell!";