From 6189ffc7ed709912a2439cdbd45d5e4af15d23e8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 26 Sep 2012 12:30:20 +0200 Subject: [PATCH] Fix bool -> byte coercion logic Change-Id: Iab6dba9484fb5ddb8a8d4efcd46d7b9c8d1acca8 --- idlc/source/astexpression.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx index 783ee6643dda..b28cfed3619c 100644 --- a/idlc/source/astexpression.cxx +++ b/idlc/source/astexpression.cxx @@ -667,7 +667,7 @@ coerce_value(AstExprValue *ev, ExprType t) ev->et = ET_byte; return ev; case ET_boolean: - ev->u.byval = (ev->u.bval == false) ? 1 : 0; + ev->u.byval = ev->u.bval ? 1 : 0; ev->et = ET_byte; return ev; case ET_float: