From da1aaed059d8a871c7f9cef3980ed85c71df7323 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 13 Feb 2015 15:27:22 +0100 Subject: don't write pointless TokFuncTerminators into the stream we are transforming "magic" function calls into other structures. past that point it's wrong to keep the function argument list terminator in the token stream. this went unnoticed, because in this context it was equivalent with the expected value list terminator (which was simply never reached). Change-Id: I3dc6719273ce9d663db867f355eba682ba6ccf2c Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qmake/library/qmakeparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qmake/library/qmakeparser.cpp') diff --git a/qmake/library/qmakeparser.cpp b/qmake/library/qmakeparser.cpp index d33662353b..61331f4348 100644 --- a/qmake/library/qmakeparser.cpp +++ b/qmake/library/qmakeparser.cpp @@ -1014,10 +1014,12 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg } flushCond(tokPtr); putLineMarker(tokPtr); + --ptr; + Q_ASSERT(*ptr == TokFuncTerminator); if (*uce == (TokLiteral|TokNewStr)) { nlen = uce[1]; uc = uce + 2 + nlen; - if (*uc == TokFuncTerminator) { + if (uc == ptr) { // for(literal) (only "ever" would be legal if qmake was sane) putTok(tokPtr, TokForLoop); putHashStr(tokPtr, (ushort *)0, (uint)0); -- cgit v1.2.3