diff --git a/plugins/libimhex/source/api/content_registry.cpp b/plugins/libimhex/source/api/content_registry.cpp index 133049155..23da41cc4 100644 --- a/plugins/libimhex/source/api/content_registry.cpp +++ b/plugins/libimhex/source/api/content_registry.cpp @@ -125,7 +125,10 @@ namespace hex { if (!json[unlocalizedCategory].contains(unlocalizedName)) return defaultValue; - if (!json[unlocalizedCategory][unlocalizedName].is_number()) + if (!json[unlocalizedCategory][unlocalizedName].is_array()) + json[unlocalizedCategory][unlocalizedName] = defaultValue; + + if (!json[unlocalizedCategory][unlocalizedName].array().empty() && !json[unlocalizedCategory][unlocalizedName][0].is_string()) json[unlocalizedCategory][unlocalizedName] = defaultValue; return json[unlocalizedCategory][unlocalizedName].get>();