diff options
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 60d424d7e..5ea8f2b0f 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1321,6 +1321,8 @@ Name SExpressionWasmBuilder::getLabel(Element& s) { offset = std::stoll(s.c_str(), nullptr, 0); } catch (std::invalid_argument) { throw ParseException("invalid break offset"); + } catch (std::out_of_range) { + throw ParseException("out of range break offset"); } if (offset > nameMapper.labelStack.size()) throw ParseException("invalid label", s.line, s.col); if (offset == nameMapper.labelStack.size()) { |