crash fix mana ability filter
This commit is contained in:
@@ -39,6 +39,8 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
|
|||||||
string value = s.substr(start -1,end);
|
string value = s.substr(start -1,end);
|
||||||
if(value == "n{")//"restrictio n{m orbid} would read the n{m as {m} millcost
|
if(value == "n{")//"restrictio n{m orbid} would read the n{m as {m} millcost
|
||||||
return manaCost;
|
return manaCost;
|
||||||
|
else if(value == "e{")//"variable{ test fix
|
||||||
|
return manaCost;
|
||||||
}
|
}
|
||||||
if (start == string::npos)
|
if (start == string::npos)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ bool WCFilterProducesColor::isMatch(MTGCard * c)
|
|||||||
|
|
||||||
//Retrieve non basic Mana abilities
|
//Retrieve non basic Mana abilities
|
||||||
string s = c->data->magicText;
|
string s = c->data->magicText;
|
||||||
size_t t = s.find("add");
|
size_t t = s.find("add{");
|
||||||
while (t != string::npos)
|
while (t != string::npos)
|
||||||
{
|
{
|
||||||
s = s.substr(t + 3);
|
s = s.substr(t + 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user