From f916b00de7af3d540d968c4dc7efa059fad8a150 Mon Sep 17 00:00:00 2001 From: scorpion-26 <58082714+scorpion-26@users.noreply.github.com> Date: Fri, 10 Feb 2023 17:10:35 +0100 Subject: [PATCH] Fix bogus comment removal The previous substr call would remove everything but the comment, which is not what we want. --- src/Config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Config.cpp b/src/Config.cpp index c08ba16..fc664f3 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -114,7 +114,7 @@ void Config::Load() } if (comment != std::string_view::npos) { - lineView = lineView.substr(comment - 1); + lineView = lineView.substr(0, comment - 1); } bool foundProperty = false; @@ -135,7 +135,7 @@ void Config::Load() if (foundProperty == false) { - LOG("Warning: unknown config var: " << line); + LOG("Warning: unknown config var: " << lineView); continue; } }