summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index edf8ec6f0..3874bd2c0 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -2237,7 +2237,7 @@ Expression* SExpressionWasmBuilder::makeTry(Element& s) {
while (i < s.size() && elementStartsWith(*s[i], "catch")) {
Element& inner = *s[i++];
- if (inner.size() < 3) {
+ if (inner.size() < 2) {
throw ParseException("invalid catch block", inner.line, inner.col);
}
Name event = getEventName(*inner[1]);