diff --git a/lib/GameSettings.cpp b/lib/GameSettings.cpp index 15a593e1b..6df29e210 100644 --- a/lib/GameSettings.cpp +++ b/lib/GameSettings.cpp @@ -118,11 +118,10 @@ void GameSettings::load(const JsonNode & input) const JsonNode & GameSettings::getValue(EGameSettings option) const { - assert(option < EGameSettings::OPTIONS_COUNT); auto index = static_cast(option); - assert(!gameSettings[index].isNull()); - return gameSettings[index]; + assert(!gameSettings.at(index).isNull()); + return gameSettings.at(index); } VCMI_LIB_NAMESPACE_END