From bb85de09190e6436d07f181e112cb8a12afe210f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 15 Feb 2024 02:44:11 +0000 Subject: [PATCH] internal: fix preload of dynamic special categories oops --- src/config.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.cpp b/src/config.cpp index 88522a4..815f43c 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -86,7 +86,8 @@ void CConfig::addSpecialConfigValue(const char* cat, const char* name, const CCo reinterpret_cast(value.m_pData)->handler, reinterpret_cast(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()) CAT->get()->values[name].defaultFrom(IT->get()->defaultValues[name]); }