diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-11-24 13:08:24 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-11-24 13:08:24 +0100 |
| commit | 56e4da85464d562e6d633ce0f6683a7eedc81f0c (patch) | |
| tree | 325af3afa6fe30cbf5d59c8ab749b991c562040c /base/runtime | |
| parent | e607cbe9307bdcad1989252dd80e1c3523cdb57a (diff) | |
Fix #4509
Diffstat (limited to 'base/runtime')
| -rw-r--r-- | base/runtime/core_builtin_soa.odin | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/base/runtime/core_builtin_soa.odin b/base/runtime/core_builtin_soa.odin index 2980b7a9e..ff27a4559 100644 --- a/base/runtime/core_builtin_soa.odin +++ b/base/runtime/core_builtin_soa.odin @@ -142,6 +142,7 @@ make_soa_slice :: proc($T: typeid/#soa[]$E, #any_int length: int, allocator := c @(builtin, require_results) make_soa_dynamic_array :: proc($T: typeid/#soa[dynamic]$E, allocator := context.allocator, loc := #caller_location) -> (array: T, err: Allocator_Error) #optional_allocator_error { context.allocator = allocator + array.allocator = allocator reserve_soa(&array, 0, loc) or_return return array, nil } @@ -149,6 +150,7 @@ make_soa_dynamic_array :: proc($T: typeid/#soa[dynamic]$E, allocator := context. @(builtin, require_results) 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 { context.allocator = allocator + array.allocator = allocator resize_soa(&array, length, loc) or_return return array, nil } |