mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibWasm: Fix logic error in Limits::parse()
The check was negated, and it errored out when the read actually succeeded.
This commit is contained in:
parent
827d94939b
commit
8ce015742d
Notes:
sideshowbarker
2024-07-18 17:11:50 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/8ce015742d3 Pull-request: https://github.com/SerenityOS/serenity/pull/7568
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ ParseResult<Limits> Limits::parse(InputStream& stream)
|
|||
Optional<u32> max;
|
||||
if (flag) {
|
||||
size_t value;
|
||||
if (LEB128::read_unsigned(stream, value))
|
||||
if (!LEB128::read_unsigned(stream, value))
|
||||
return with_eof_check(stream, ParseError::ExpectedSize);
|
||||
max = value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue