diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-26 10:19:45 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-26 10:19:45 +0000 |
| commit | c77098a91c9d536f4aa1702050cabb7fb752c324 (patch) | |
| tree | aa60dc9aa9fa8a25c200ee8a59c942f727213689 /src/ir.cpp | |
| parent | 89cceb910a167e4745ed6f34af269b7a2f1b0849 (diff) | |
Fix for in enum type
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index b545e7ce3..9607f8ce7 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -10104,7 +10104,7 @@ void ir_build_range_enum(irProcedure *proc, Type *enum_type, Type *val_type, irV irValue *max_count = ir_const_int(enum_count); irValue *ti = ir_type_info(proc, t); - irValue *variant = ir_emit_struct_ep(proc, ti, 3); + irValue *variant = ir_emit_struct_ep(proc, ti, 4); irValue *eti_ptr = ir_emit_conv(proc, variant, t_type_info_enum_ptr); irValue *values = ir_emit_load(proc, ir_emit_struct_ep(proc, eti_ptr, 2)); irValue *values_data = ir_slice_elem(proc, values); |