diff options
Diffstat (limited to 'src/abi/stack.h')
-rw-r--r-- | src/abi/stack.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/abi/stack.h b/src/abi/stack.h index cc678b6e8..93a6e4cc1 100644 --- a/src/abi/stack.h +++ b/src/abi/stack.h @@ -50,7 +50,8 @@ getStackSpace(Index local, Function* func, Index size, Module& wasm) { } // align the size size = stackAlign(size); - auto pointerType = wasm.memory.indexType; + auto pointerType = + !wasm.memories.empty() ? wasm.memories[0]->indexType : Type::i32; // TODO: find existing stack usage, and add on top of that - carefully Builder builder(wasm); auto* block = builder.makeBlock(); |