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 b31b727b7..a48ee1a5f 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -78,6 +78,7 @@ public: } Element* operator[](unsigned i) { + if (i >= list().size()) throw ParseException("expected more elements in list", line, col); return list()[i]; } |