From b4c45aa2e3af0e595a6276986290c78d11465746 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 6 Nov 2022 14:28:15 +0000 Subject: [PATCH] fix compiler warning --- src/config/ConfigManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index e64fc86b..303ba340 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1071,7 +1071,7 @@ void CConfigManager::parseLine(std::string& line) { } size_t startPos = 0; - while (startPos < line.length() - 1 && (startPos = line.find("##", startPos)) != std::string::npos) { + while ((startPos = line.find("##", startPos)) != std::string::npos && startPos < line.length() - 1 && startPos > 0) { line.replace(startPos, 2, "#"); startPos++; }