mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Fix crash on accessing "any" spellschool via bonus system
This commit is contained in:
@@ -420,6 +420,9 @@ si32 SpellSchool::decode(const std::string & identifier)
|
|||||||
|
|
||||||
std::string SpellSchool::encode(const si32 index)
|
std::string SpellSchool::encode(const si32 index)
|
||||||
{
|
{
|
||||||
|
if (index == ANY.getNum())
|
||||||
|
return "any";
|
||||||
|
|
||||||
return SpellConfig::SCHOOL[index].jsonName;
|
return SpellConfig::SCHOOL[index].jsonName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user