Maelstrom: Fixed out of memory errors on Emscripten

From cfd670756dbe56c848ade53b6fa74cdfd01f61af Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 30 Mar 2026 08:05:26 -0700
Subject: [PATCH] Fixed out of memory errors on Emscripten

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 673e9088..81c1bbfe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -206,7 +206,7 @@ target_link_libraries(${TARGET_NAME} PRIVATE SDL3::SDL3)
 
 if(EMSCRIPTEN)
     # Increase the default stack size
-    target_link_options(${TARGET_NAME} PRIVATE -sSTACK_SIZE=1048576)
+    target_link_options(${TARGET_NAME} PRIVATE -sALLOW_MEMORY_GROWTH=1 -sSTACK_SIZE=1048576)
 
     # on the web, we have to put the files inside of the webassembly
     # somewhat unintuitively, this is done via a linker argument.