Fix bool -> byte coercion logic
Change-Id: Iab6dba9484fb5ddb8a8d4efcd46d7b9c8d1acca8
This commit is contained in:
@@ -667,7 +667,7 @@ coerce_value(AstExprValue *ev, ExprType t)
|
|||||||
ev->et = ET_byte;
|
ev->et = ET_byte;
|
||||||
return ev;
|
return ev;
|
||||||
case ET_boolean:
|
case ET_boolean:
|
||||||
ev->u.byval = (ev->u.bval == false) ? 1 : 0;
|
ev->u.byval = ev->u.bval ? 1 : 0;
|
||||||
ev->et = ET_byte;
|
ev->et = ET_byte;
|
||||||
return ev;
|
return ev;
|
||||||
case ET_float:
|
case ET_float:
|
||||||
|
Reference in New Issue
Block a user