crash fix

transform getaicustomcode to lower
This commit is contained in:
Anthony Calosa
2017-02-10 21:00:18 +08:00
parent 5915ceb0a5
commit 02dce1af2e
2 changed files with 5 additions and 3 deletions

View File

@@ -3686,7 +3686,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
a->named = newName;
if(card->getAICustomCode().size() && card->controller()->isAI())
{
MTGAbility * a3 = parseMagicLine(card->getAICustomCode(), id, spell, card);
string abi = card->getAICustomCode();
std::transform(abi.begin(), abi.end(), abi.begin(), ::tolower);//fix crash
MTGAbility * a3 = parseMagicLine(abi, id, spell, card);
a3->oneShot = 1;
a3->canBeInterrupted = false;
return a3;