Pass a reference to a variable with correct size when creating the expression, otherwise mpz_import_data() will read only the always zero upper byte on Big Endian hosts. Fixes: afb6a8e66a111 ("datatype: clamp boolean value to 0 and 1") Signed-off-by: Phil Sutter --- src/datatype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datatype.c b/src/datatype.c index f347010f4a1af..7104ae8119ec6 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -1559,7 +1559,7 @@ static struct error_record *boolean_type_parse(struct parse_ctx *ctx, struct expr **res) { struct error_record *erec; - int num; + uint8_t num; erec = integer_type_parse(ctx, sym, res); if (erec) -- 2.51.0