Fix #3514 along with soa.a[i] bounds checking

This commit is contained in:
gingerBill
2024-05-16 16:18:21 +01:00
parent 330d6117e3
commit 32245e93a1
4 changed files with 49 additions and 20 deletions
+1 -1
View File
@@ -1324,7 +1324,7 @@ gb_internal lbValue lb_addr_load(lbProcedure *p, lbAddr const &addr) {
for (isize i = 0; i < field_count; i++) {
Entity *field = t->Struct.fields[i];
Type *base_type = field->type;
GB_ASSERT(base_type->kind == Type_Pointer);
GB_ASSERT(base_type->kind == Type_MultiPointer);
lbValue dst = lb_emit_struct_ep(p, res.addr, cast(i32)i);
lbValue src_ptr = lb_emit_struct_ep(p, addr.addr, cast(i32)i);