From 0c04b9398a79451c3a21a855d77d1d4b92d09efc Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 19 Mar 2019 20:22:25 +0000 Subject: Fix bug with assigning certain integers to a bit_field #353 --- src/check_stmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 07de5dc2e..07aee1a7b 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -264,7 +264,7 @@ Type *check_assignment_variable(CheckerContext *ctx, Operand *lhs, Operand *rhs) } BigInt imax = big_int_make_u64(imax_); - if (big_int_cmp(&i, &imax) > 0) { + if (big_int_cmp(&i, &imax) >= 0) { return rhs->type; } } -- cgit v1.2.3