Fixed: Config parser missing first value when not including version header

This commit is contained in:
aristocratos 2021-11-04 12:36:23 +01:00
parent 45169223eb
commit 9af8e0074d

View file

@ -530,9 +530,8 @@ namespace Config {
vector<string> valid_names;
for (auto &n : descriptions)
valid_names.push_back(n[0]);
string v_string;
getline(cread, v_string, '\n');
if (not s_contains(v_string, Global::Version))
if (string v_string; cread.peek() != '#' or (getline(cread, v_string, '\n') and not s_contains(v_string, Global::Version)))
write_new = true;
while (not cread.eof()) {
cread >> std::ws;