Fix bool -> byte coercion logic

Change-Id: Iab6dba9484fb5ddb8a8d4efcd46d7b9c8d1acca8
This commit is contained in:
Stephan Bergmann 2012-09-26 12:30:20 +02:00
parent 20b77f616a
commit 6189ffc7ed

View file

@ -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: