Fix indexing logic of FCD arrays

This commit is contained in:
gingerBill
2026-03-25 14:10:08 +00:00
parent e6d7ccad2c
commit 59eaa13625

View File

@@ -8889,8 +8889,11 @@ gb_internal bool check_set_index_data(Operand *o, Type *t, bool indirection, i64
case Type_FixedCapacityDynamicArray:
o->type = t->FixedCapacityDynamicArray.elem;
if (o->mode != Addressing_Constant) {
if (indirection) {
o->mode = Addressing_Variable;
} else if (o->mode != Addressing_Variable &&
o->mode != Addressing_Constant) {
o->mode = Addressing_Value;
}
return true;