diff --git a/lib/spells/effects/Obstacle.cpp b/lib/spells/effects/Obstacle.cpp index 5622ecc6e..4c381ce9c 100644 --- a/lib/spells/effects/Obstacle.cpp +++ b/lib/spells/effects/Obstacle.cpp @@ -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);