mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 01:34:35 +00:00
fixes f32 to 64-bit int/uint conversion
This commit is contained in:
@@ -2546,7 +2546,9 @@ gb_internal lbValue lb_emit_conv(lbProcedure *p, lbValue value, Type *t) {
|
||||
lbValue res_i128 = lb_emit_runtime_call(p, call, args);
|
||||
return lb_emit_conv(p, res_i128, t);
|
||||
}
|
||||
i64 sz = type_size_of(src);
|
||||
// the intermediate int must be at least as wide as the dest,
|
||||
// otherwise e.g. f32 -> u64 truncates through a 32-bit fptoui
|
||||
i64 sz = gb_max(type_size_of(src), type_size_of(dst));
|
||||
|
||||
lbValue res = {};
|
||||
res.type = t;
|
||||
|
||||
Reference in New Issue
Block a user