summaryrefslogtreecommitdiffstats
path: root/qmake/library
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-13 15:27:22 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-25 13:54:40 +0000
commitda1aaed059d8a871c7f9cef3980ed85c71df7323 (patch)
treefe4629d0f5b8f81823f49395f767d655dfe1db76 /qmake/library
parent756d5502f9f1eb5dae589e233f427ac48e6e92ed (diff)
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 <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'qmake/library')
-rw-r--r--qmake/library/qmakeparser.cpp4
1 files changed, 3 insertions, 1 deletions
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);