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 f71d65707..642a28606 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -1040,6 +1040,7 @@ private:
for (; i < s.size(); i++) {
Element& curr = *s[i];
assert(curr[0]->str() == CASE);
+ if (curr.size() < 2) onError();
ret->cases.emplace_back(curr[1]->str(), makeMaybeBlock(curr, 2, curr.size()));
}
ret->updateCaseMap();