src/check_expr.cpp

This commit is contained in:
kalsprite
2026-08-06 21:51:03 -07:00
parent a7c8a4b942
commit 6276f6e12f

View File

@@ -4082,7 +4082,7 @@ gb_internal bool check_transmute(CheckerContext *c, Ast *node, Operand *o, Type
big_int_shl_eq(&umax, &sz_in_bits);
if (is_type_unsigned(src_t) && !is_type_unsigned(dst_t)) {
if (big_int_cmp(&v, &smax) >= 0) {
if (big_int_cmp(&v, &smax) > 0) {
big_int_sub_eq(&v, &umax);
}
} else if (!is_type_unsigned(src_t) && is_type_unsigned(dst_t)) {