diff options
author | Ben Smith <binji@chromium.org> | 2020-05-13 18:14:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 18:14:13 -0700 |
commit | d087e702d520207871ae82c58461fb08d58af187 (patch) | |
tree | f2108d0282df71b812e4204a385387faaf5afb3a /src/wast-parser.cc | |
parent | 73cc590820a526c553ce9d70b1fa1096826bc773 (diff) | |
download | wabt-d087e702d520207871ae82c58461fb08d58af187.tar.gz wabt-d087e702d520207871ae82c58461fb08d58af187.tar.bz2 wabt-d087e702d520207871ae82c58461fb08d58af187.zip |
Update testsuite (#1424)
Includes the three merged proposals (nontrapping-float-to-int,
sign-extension, multi-value).
It also has one bug fix when parsing table limits (when the min or max
size does not fit in a 32-bit int).
Diffstat (limited to 'src/wast-parser.cc')
-rw-r--r-- | src/wast-parser.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc index e443f3b2..4a7ad526 100644 --- a/src/wast-parser.cc +++ b/src/wast-parser.cc @@ -926,7 +926,8 @@ Result WastParser::ParseNat(uint64_t* out_nat) { Token token = Consume(); string_view sv = token.literal().text; - if (Failed(ParseUint64(sv.begin(), sv.end(), out_nat))) { + if (Failed(ParseUint64(sv.begin(), sv.end(), out_nat)) || + *out_nat > 0xffffffffu) { Error(token.loc, "invalid int \"" PRIstringview "\"", WABT_PRINTF_STRING_VIEW_ARG(sv)); } |