diff options
author | Oswald Buddenhagen <[email protected]> | 2015-02-13 15:27:22 +0100 |
---|---|---|
committer | Oswald Buddenhagen <[email protected]> | 2015-02-25 13:54:40 +0000 |
commit | da1aaed059d8a871c7f9cef3980ed85c71df7323 (patch) | |
tree | fe4629d0f5b8f81823f49395f767d655dfe1db76 /qmake/library/qmakeparser.cpp | |
parent | 756d5502f9f1eb5dae589e233f427ac48e6e92ed (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 <[email protected]>
Reviewed-by: Oswald Buddenhagen <[email protected]>
Diffstat (limited to 'qmake/library/qmakeparser.cpp')
-rw-r--r-- | qmake/library/qmakeparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qmake/library/qmakeparser.cpp b/qmake/library/qmakeparser.cpp index d33662353ba..61331f43483 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); |