From 24049d3da45f98fac572fc2a21ad8c073fc3816e Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Thu, 19 May 2011 12:35:35 +0000 Subject: [PATCH] fixed a reported bug with blood chief accession, the cause was a goof up in logic, in the refactor to this section, foelost( parsing was changed to be its bool for lifelost....however since it was changed and we now didn't declare that "foelost(" was "found"...found was a null variable when we tried to atoi it.... --- projects/mtg/src/MTGAbility.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 707df47cb..563bdbca2 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -423,9 +423,8 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string magicText, int bool limitOnceATurn = (s.find("turnlimited") != string::npos); bool isSuspended = (s.find("suspended") != string::npos); bool opponentPoisoned = (s.find("opponentpoisoned") != string::npos); - - bool lifelost = (s.find("foelost(") != string::npos); - int lifeamount = lifelost ? atoi(s.substr(found + 8,')').c_str()) : 0 ; + bool lifelost = (s.find("foelost(") != string::npos); + int lifeamount = lifelost ? atoi(s.substr(s.find("foelost(") + 8,')').c_str()) : 0; //Card Changed Zone found = s.find("movedto(");