diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2011-05-05 17:19:01 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2011-05-05 17:19:01 +0200 |
commit | e50b7c92998905efdd40314724480e3070bdbcb5 (patch) | |
tree | f83dcfbc426e5a98d120f926d54cdf98892e31c7 /src | |
parent | 8883e0500eb7dee2439fce884acfd2177e07811a (diff) |
Fix evaluation of boolean conditions
Ensure that the operand of IR::OpIfTrue and IR::OpNot has boolean type.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/v4/qdeclarativev4compiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/v4/qdeclarativev4compiler.cpp b/src/declarative/qml/v4/qdeclarativev4compiler.cpp index a7eecce0c9..e67a3821d7 100644 --- a/src/declarative/qml/v4/qdeclarativev4compiler.cpp +++ b/src/declarative/qml/v4/qdeclarativev4compiler.cpp @@ -404,15 +404,15 @@ void QDeclarativeV4CompilerPrivate::visitUnop(IR::Unop *e) break; case IR::OpIfTrue: + convertToBool(e->expr, src); if (src != currentReg) { i.move_reg_reg(currentReg, src); gen(i); - } else { - // nothing to do } break; case IR::OpNot: + convertToBool(e->expr, src); i.unary_not(currentReg, src); gen(i); break; |