summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-27 23:12:01 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-27 23:12:01 +0200
commit573cb0d4e062fbdec5c49169c2885a07ea91b726 (patch)
treeef9adc9924d75a191f6a46b37bf88b19c8579f79 /src/config/ConfigManager.cpp
parented2cacc5d57d859cf36dd3ff5076b4ce18a540f1 (diff)
fix parser in nested categories
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 460d024f..a502423b 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -935,7 +935,14 @@ void CConfigManager::parseLine(std::string& line) {
}
if (line.contains("}") && currentCategory != "") {
- currentCategory = "";
+
+ const auto LASTSEP = currentCategory.find_last_of(':');
+
+ if (LASTSEP == std::string::npos)
+ currentCategory = "";
+ else
+ currentCategory = currentCategory.substr(0, LASTSEP);
+
return;
}