summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wasm/wasm-binary.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index a9b14dba3..9c7eb55f2 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -1691,9 +1691,11 @@ void WasmBinaryBuilder::processExpressions() {
peek == BinaryConsts::Catch) {
BYN_TRACE("== processExpressions finished with unreachable"
<< std::endl);
- readNextDebugLocation();
lastSeparator = BinaryConsts::ASTNodes(peek);
- pos++;
+ // Read the byte we peeked at. No new instruction is generated for it.
+ Expression* dummy = nullptr;
+ readExpression(dummy);
+ assert(!dummy);
return;
} else {
skipUnreachableCode();