Fixed #5725 (FP: multicondition Expression is always false because 'else if' in pngwrite.cxx (LibreOffice))

This commit is contained in:
Frank Zingsheim 2014-04-26 11:59:38 +02:00 committed by Daniel Marjamäki
parent 853d56030b
commit ffa55bbaa0
2 changed files with 2 additions and 0 deletions

View File

@ -576,6 +576,7 @@ static void compileParAndBrackets(Token *&tok, std::stack<Token*> &op, unsigned
while (tok) {
if (tok->str() == "[") {
compileBinOp(tok, compileScope, op, depth);
tok = tok->next();
} else break;
}
}

View File

@ -10341,6 +10341,7 @@ private:
" | `-i\n"
" `-f\n",
testAst("x = ((a[i]).f)();", true));
ASSERT_EQUALS("ifp*0[1==(", testAst("if((*p)[0]==1)"));
// casts
ASSERT_EQUALS("a1(2(+=",testAst("a=(t)1+(t)2;"));