mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-14 11:50:32 +00:00
Fix lb_convert_struct_index for struct #raw_union
This commit is contained in:
@@ -1069,6 +1069,9 @@ gb_internal lbStructFieldRemapping lb_get_struct_remapping(lbModule *m, Type *t)
|
||||
|
||||
gb_internal i32 lb_convert_struct_index(lbModule *m, Type *t, i32 index) {
|
||||
if (t->kind == Type_Struct) {
|
||||
if (t->Struct.is_raw_union) {
|
||||
return 0;
|
||||
}
|
||||
auto field_remapping = lb_get_struct_remapping(m, t);
|
||||
return field_remapping[index];
|
||||
} else if (is_type_any(t) && build_context.ptr_size == 4) {
|
||||
|
||||
Reference in New Issue
Block a user