fixed a parsing error with tokengen, no actually my fault :P there was never a check if the end was the real end or not.

2nd, added this(blocking) in hopes to fix mogg flunkies and similar creatures.
This commit is contained in:
omegablast2002@yahoo.com
2011-04-14 17:06:44 +00:00
parent 115ad75c2f
commit 9d52e4547e
3 changed files with 35 additions and 2 deletions
+3 -1
View File
@@ -1817,7 +1817,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return tok;
}
}
size_t realEnd = s.find(")", found);
end = s.find(",", found);
string sname = s.substr(found + 6, end - found - 6);
size_t previous = end + 1;
@@ -1825,6 +1825,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
string stypes = s.substr(previous, end - previous);
previous = end + 1;
end = s.find(",", previous);
if(end == string::npos)
end = realEnd;
string spt = s.substr(previous, end - previous);
int value = 0;
int power, toughness;