1 parent 336f6fc commit 9a38d59Copy full SHA for 9a38d59
1 file changed
source/supreme/game.cpp
@@ -828,7 +828,9 @@ TASK(void) TestLevel(world_t *world,byte level)
828
else if(result==WORLD_QUITGAME || result==WORLD_ABORT)
829
break;
830
}
831
- curWorld = {};
+ // `curWorld = {};` is more C++ey here, but stack overflows on unoptimized Emscripten builds.
832
+ // sizeof(world_t) ~= 776560 >> 65536 due to large embedded Tilegfx.
833
+ memset(&curWorld, 0, sizeof(world_t));
834
InitGuys(256);
835
GetSpecialsFromMap(EditorGetMap()->special);
836
editing=1;
0 commit comments