diff options
-rw-r--r-- | src/wasm-s-parser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 7cada23af..dae321866 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1031,6 +1031,7 @@ private: } Expression* makeMaybeBlock(Element& s, size_t i, size_t stopAt=-1) { + if (s.size() == i) return allocator.alloc<Nop>(); if (s.size() == i+1) return parseExpression(s[i]); auto ret = allocator.alloc<Block>(); for (; i < s.size() && i < stopAt; i++) { |