1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fixed possible crash related to Peculiar Enchants.

This commit is contained in:
DjWarmonger 2011-06-24 07:12:52 +00:00
parent d88b6b1bb3
commit e41d2f6e87

View File

@ -3500,7 +3500,7 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, int destinatio
if (caster)
bonus = caster->getBonus(Selector::typeSybtype(Bonus::SPECIAL_PECULIAR_ENCHANT, spellID));
si32 power;
si32 power = 0;
for(std::set<CStack*>::iterator it = attackedCres.begin(); it != attackedCres.end(); ++it)
{
if(vstd::contains(sc.resisted, (*it)->ID)) //this creature resisted the spell