mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-17 03:12:22 -07:00
Fix #1174
This commit is contained in:
@@ -3325,11 +3325,13 @@ i64 type_offset_of(Type *t, i32 index) {
|
||||
if (t->kind == Type_Struct) {
|
||||
type_set_offsets(t);
|
||||
if (gb_is_between(index, 0, t->Struct.fields.count-1)) {
|
||||
GB_ASSERT(t->Struct.offsets != nullptr);
|
||||
return t->Struct.offsets[index];
|
||||
}
|
||||
} else if (t->kind == Type_Tuple) {
|
||||
type_set_offsets(t);
|
||||
if (gb_is_between(index, 0, t->Tuple.variables.count-1)) {
|
||||
GB_ASSERT(t->Tuple.offsets != nullptr);
|
||||
return t->Tuple.offsets[index];
|
||||
}
|
||||
} else if (t->kind == Type_Basic) {
|
||||
|
||||
Reference in New Issue
Block a user