summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index 75d6fed1d..f244a08f9 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -274,6 +274,7 @@ public:
// Assumes control of and modifies the input.
SExpressionWasmBuilder(Module& wasm, Element& module, Name* moduleName = nullptr) : wasm(wasm), allocator(wasm.allocator), importCounter(0), globalCounter(0) {
assert(module[0]->str() == MODULE);
+ if (module.size() == 1) return;
Index i = 1;
if (module[i]->dollared()) {
if (moduleName) {