Browse Source

Fix bug with assigning certain integers to a bit_field #353

gingerBill 6 years ago
parent
commit
0c04b9398a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/check_stmt.cpp

+ 1 - 1
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;
 						}
 					}