Browse Source

Merge pull request #2204 from colrdavidson/fix_wasm_mem

fix missing wasm memory case
gingerBill 2 years ago
parent
commit
13d052027f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      vendor/wasm/js/memory.odin

+ 1 - 1
vendor/wasm/js/memory.odin

@@ -21,7 +21,7 @@ page_allocator :: proc() -> mem.Allocator {
 	                  old_memory: rawptr, old_size: int,
 	                  old_memory: rawptr, old_size: int,
 	                  location := #caller_location) -> ([]byte, mem.Allocator_Error) {
 	                  location := #caller_location) -> ([]byte, mem.Allocator_Error) {
 		switch mode {
 		switch mode {
-		case .Alloc:
+		case .Alloc, .Alloc_Non_Zeroed:
 			assert(size % PAGE_SIZE == 0)
 			assert(size % PAGE_SIZE == 0)
 			return page_alloc(size/PAGE_SIZE)
 			return page_alloc(size/PAGE_SIZE)
 		case .Resize, .Free, .Free_All, .Query_Info:
 		case .Resize, .Free, .Free_All, .Query_Info: