crash fix mana ability filter

This commit is contained in:
Anthony Calosa
2017-02-26 15:22:16 +08:00
parent 178fcb9717
commit 0f82b6efba
2 changed files with 3 additions and 1 deletions

View File

@@ -39,6 +39,8 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
string value = s.substr(start -1,end);
if(value == "n{")//"restrictio n{m orbid} would read the n{m as {m} millcost
return manaCost;
else if(value == "e{")//"variable{ test fix
return manaCost;
}
if (start == string::npos)
{

View File

@@ -272,7 +272,7 @@ bool WCFilterProducesColor::isMatch(MTGCard * c)
//Retrieve non basic Mana abilities
string s = c->data->magicText;
size_t t = s.find("add");
size_t t = s.find("add{");
while (t != string::npos)
{
s = s.substr(t + 3);