avoid infinite loop on unterminated bracketed expressions
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Fri, 26 Jul 2013 13:11:57 +0000 (15:11 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 1 Aug 2013 11:36:52 +0000 (13:36 +0200)
Change-Id: I9469608e1b9ce1d345c4011982b19814ebd39b53
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
src/linguist/lupdate/cpp.cpp

index 7418689..b6222e6 100644 (file)
@@ -1616,8 +1616,10 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac
         // so they don't confuse our scoping of static initializers.
         // we enter the loop by either reading a left bracket or by an
         // #else popping the state.
-        while (yyBracketDepth)
+        if (yyBracketDepth) {
             yyTok = getToken();
+            continue;
+        }
         //qDebug() << "TOKEN: " << yyTok;
         switch (yyTok) {
         case Tok_QuotedInclude: {