1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-28 03:57:02 +02:00

Fix crash on firewall cast attempt

This commit is contained in:
Ivan Savenko 2023-01-04 17:38:55 +02:00
parent d712a6b896
commit e1a244beb0

View File

@ -60,7 +60,6 @@ void ObstacleSideOptions::serializeRelativeShape(JsonSerializeFormat & handler,
"BR",
"BL",
"L",
""
};
{
@ -78,7 +77,9 @@ void ObstacleSideOptions::serializeRelativeShape(JsonSerializeFormat & handler,
if(handler.saving)
{
temp = EDirMap.at(value.at(outerIndex).at(innerIndex));
auto index = value.at(outerIndex).at(innerIndex);
if (index < EDirMap.size())
temp = EDirMap[index];
}
inner.serializeString(innerIndex, temp);