diff options
author | Thomas Lively <tlively@google.com> | 2022-10-12 18:52:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 16:52:51 -0700 |
commit | 75418f6a8a85ef6c1fd100cdae97348140ed3184 (patch) | |
tree | 233d7e42af0905bd1a9d2cc5ca5a01ab7e3867e6 /src/wasm/wat-lexer.cpp | |
parent | f04fafebe8cb3aaa5751bffc2ab1e7695f7b17bb (diff) | |
download | binaryen-75418f6a8a85ef6c1fd100cdae97348140ed3184.tar.gz binaryen-75418f6a8a85ef6c1fd100cdae97348140ed3184.tar.bz2 binaryen-75418f6a8a85ef6c1fd100cdae97348140ed3184.zip |
[Parser] Parse instructions with children (#5129)
Parse unary, binary, drop, and select instructions, properly fixing up stacky
code, unreachable code, and multivalue code so it can be represented in Binaryen
IR.
Diffstat (limited to 'src/wasm/wat-lexer.cpp')
-rw-r--r-- | src/wasm/wat-lexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wat-lexer.cpp b/src/wasm/wat-lexer.cpp index c7959295c..80dda44b0 100644 --- a/src/wasm/wat-lexer.cpp +++ b/src/wasm/wat-lexer.cpp @@ -943,7 +943,7 @@ void Lexer::lexToken() { } TextPos Lexer::position(const char* c) const { - assert(size_t(c - buffer.data()) < buffer.size()); + assert(size_t(c - buffer.data()) <= buffer.size()); TextPos pos{1, 0}; for (const char* p = buffer.data(); p != c; ++p) { if (*p == '\n') { |