mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 09:44:26 +00:00
src/check_expr.cpp
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user