1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Fix initialization of visitDir in templates

This commit is contained in:
Ivan Savenko
2023-01-20 02:07:22 +02:00
parent a3846f1b31
commit 8b2d336562
3 changed files with 14 additions and 6 deletions

View File

@ -359,13 +359,13 @@ void CObjectClassesHandler::beforeValidate(JsonNode & object)
{
auto const & vector = object["subObjects"].Vector();
if (!entry.second.Struct().count("index"))
continue;
if (entry.second.Struct().count("index"))
{
size_t index = entry.second["index"].Integer();
size_t index = entry.second["index"].Integer();
if (index < vector.size())
JsonUtils::inherit(entry.second, vector[index]);
if (index < vector.size())
JsonUtils::inherit(entry.second, vector[index]);
}
}
JsonUtils::inherit(entry.second, object["base"]);