internal: fix preload of dynamic special categories

oops
This commit is contained in:
Vaxry 2024-02-15 02:44:11 +00:00
parent 039f320202
commit bb85de0919

View file

@ -86,7 +86,8 @@ void CConfig::addSpecialConfigValue(const char* cat, const char* name, const CCo
reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->handler, reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->handler,
reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->dtor}); reinterpret_cast<CConfigCustomValueType*>(value.m_pData)->dtor});
const auto CAT = std::find_if(impl->specialCategories.begin(), impl->specialCategories.end(), [cat](const auto& other) { return other->name == cat; }); const auto CAT = std::find_if(impl->specialCategories.begin(), impl->specialCategories.end(), [cat, name](const auto& other) { return other->name == cat && other->isStatic; });
if (CAT != impl->specialCategories.end()) if (CAT != impl->specialCategories.end())
CAT->get()->values[name].defaultFrom(IT->get()->defaultValues[name]); CAT->get()->values[name].defaultFrom(IT->get()->defaultValues[name]);
} }