mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-05 13:04:54 +02:00
Fix crash on firewall cast attempt
This commit is contained in:
parent
d712a6b896
commit
e1a244beb0
@ -60,7 +60,6 @@ void ObstacleSideOptions::serializeRelativeShape(JsonSerializeFormat & handler,
|
|||||||
"BR",
|
"BR",
|
||||||
"BL",
|
"BL",
|
||||||
"L",
|
"L",
|
||||||
""
|
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -78,7 +77,9 @@ void ObstacleSideOptions::serializeRelativeShape(JsonSerializeFormat & handler,
|
|||||||
|
|
||||||
if(handler.saving)
|
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);
|
inner.serializeString(innerIndex, temp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user