diff options
-rw-r--r-- | src/helpers/MiscFunctions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 10d59316..ab3c826e 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -209,7 +209,7 @@ std::string removeBeginEndSpacesTabs(std::string str) { } int countAfter = 0; - while (str.length() != 0 && (str[str.length() - countAfter - 1] == ' ' || str[str.length() - 1 - countAfter] == '\t')) { + while ((int)str.length() - countAfter - 1 >= 0 && (str[str.length() - countAfter - 1] == ' ' || str[str.length() - 1 - countAfter] == '\t')) { countAfter++; } @@ -562,4 +562,4 @@ std::string replaceInString(std::string subject, const std::string& search, cons pos += replace.length(); } return subject; -}
\ No newline at end of file +} |