Skip to content

Commit 73ab881

Browse files
authored
Merge pull request #4510 from Kelimion/fix_4509
Fix #4509
2 parents e607cbe + 56e4da8 commit 73ab881

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

base/runtime/core_builtin_soa.odin

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,15 @@ make_soa_slice :: proc($T: typeid/#soa[]$E, #any_int length: int, allocator := c
142142
@(builtin, require_results)
143143
make_soa_dynamic_array :: proc($T: typeid/#soa[dynamic]$E, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_allocator_error {
144144
context.allocator = allocator
145+
array.allocator = allocator
145146
reserve_soa(&array, 0, loc) or_return
146147
return array, nil
147148
}
148149

149150
@(builtin, require_results)
150151
make_soa_dynamic_array_len :: proc($T: typeid/#soa[dynamic]$E, #any_int length: int, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_allocator_error {
151152
context.allocator = allocator
153+
array.allocator = allocator
152154
resize_soa(&array, length, loc) or_return
153155
return array, nil
154156
}

0 commit comments

Comments
 (0)