From db29bc50cf88e712a13ab515b31de54cdb8b10bb Mon Sep 17 00:00:00 2001 From: sum2012 Date: Thu, 24 Apr 2014 06:36:34 +0800 Subject: [PATCH] Use @unknownbrackets fix --- file/ini_file.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/file/ini_file.cpp b/file/ini_file.cpp index 78d6cb24aa..615df16a12 100644 --- a/file/ini_file.cpp +++ b/file/ini_file.cpp @@ -40,13 +40,9 @@ static bool ParseLine(const std::string& line, std::string* keyOut, std::string* FirstCommentChar = 0; // Allow preservation of spacing before comment - if (FirstCommentChar > 0) + while (FirstCommentChar > 0 && line[FirstCommentChar - 1] <= ' ') { - while (line[FirstCommentChar - 1] == ' ' || line[FirstCommentChar - 1] == 9) // 9 == tab - { - FirstCommentChar--; - if (FirstCommentChar <= 0) break; - } + FirstCommentChar--; } if ((FirstEquals >= 0) && ((FirstCommentChar < 0) || (FirstEquals < FirstCommentChar)))