From b0aa08f85b206397db6b4891ef3607c79cd75da1 Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Thu, 18 Jan 2024 10:33:40 +0100 Subject: [PATCH] Correct wasm page_allocator switch cases --- vendor/wasm/js/memory_js.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/wasm/js/memory_js.odin b/vendor/wasm/js/memory_js.odin index fbb9a0f54..8e4977ee4 100644 --- a/vendor/wasm/js/memory_js.odin +++ b/vendor/wasm/js/memory_js.odin @@ -21,10 +21,10 @@ page_allocator :: proc() -> mem.Allocator { old_memory: rawptr, old_size: int, location := #caller_location) -> ([]byte, mem.Allocator_Error) { switch mode { - case .Alloc, .Alloc_Non_Zeroed, .Resize_Non_Zeroed: + case .Alloc, .Alloc_Non_Zeroed: assert(size % PAGE_SIZE == 0) return page_alloc(size/PAGE_SIZE) - case .Resize, .Free, .Free_All, .Query_Info: + case .Resize, .Free, .Free_All, .Query_Info, .Resize_Non_Zeroed: return nil, .Mode_Not_Implemented case .Query_Features: set := (^mem.Allocator_Mode_Set)(old_memory)