diff options
author | Kitzunu <24550914+Kitzunu@users.noreply.github.com> | 2024-07-20 02:54:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 21:54:47 -0300 |
commit | 5c09a3194e09e4c1c6a752a8648f50ee342e1157 (patch) | |
tree | 11150a8e7d9b38cb3454a272823fc48e35bb9d8c /src | |
parent | dace083a6299d3cfd23ae977ac267d122f10eb92 (diff) |
fix(Core/Config): Allow `#` outside of comments (#19447)
Diffstat (limited to 'src')
-rw-r--r-- | src/common/Configuration/Config.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp index d8665593ca..8dcb65b155 100644 --- a/src/common/Configuration/Config.cpp +++ b/src/common/Configuration/Config.cpp @@ -144,29 +144,17 @@ namespace // read line error if (!in.good() && !in.eof()) - { throw ConfigException(Acore::StringFormatFmt("> Config::LoadFile: Failure to read line number {} in file '{}'", lineNumber, file)); - } // remove whitespace in line line = Acore::String::Trim(line, in.getloc()); if (line.empty()) - { continue; - } - // comments + // comments and headers if (line[0] == '#' || line[0] == '[') - { continue; - } - - size_t found = line.find_first_of('#'); - if (found != std::string::npos) - { - line = line.substr(0, found); - } auto const equal_pos = line.find('='); @@ -183,9 +171,7 @@ namespace // Skip if 2+ same options in one config file if (IsDuplicateOption(entry)) - { continue; - } // Add to temp container fileConfigs.emplace(entry, value); |