From 56e4da85464d562e6d633ce0f6683a7eedc81f0c Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Sun, 24 Nov 2024 13:08:24 +0100 Subject: [PATCH] Fix #4509 --- base/runtime/core_builtin_soa.odin | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base/runtime/core_builtin_soa.odin b/base/runtime/core_builtin_soa.odin index 2980b7a9e8b..ff27a4559f0 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 }