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:
parent
d712a6b896
commit
e1a244beb0
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user