mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 10:20:05 +00:00
Fix unions with zero variants
This commit is contained in:
@@ -1306,6 +1306,11 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
|
||||
}
|
||||
|
||||
case runtime.Type_Info_Union:
|
||||
if type_info.size == 0 {
|
||||
strings.write_string(fi.buf, "nil");
|
||||
return;
|
||||
}
|
||||
|
||||
tag_ptr := uintptr(v.data) + info.tag_offset;
|
||||
tag_any := any{rawptr(tag_ptr), info.tag_type.id};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user