diff --git a/utilities/parser.cpp b/utilities/parser.cpp index d22cb4d2..b64aee39 100644 --- a/utilities/parser.cpp +++ b/utilities/parser.cpp @@ -426,7 +426,7 @@ void cParser::stripFirstTokenBOM(std::string& token, bool ToLower, const char* B } // if first "token" was standalone BOM, read the next real token (avoid recursion) - if (token.empty() && mStream->peek() != EOF) { + if (token.empty() && hasChar()) { // readToken will not re-enter BOM stripping because mFirstToken is now false readToken(token, ToLower, Break); }