1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +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:
Ali Mohammad Pur 2021-05-29 22:57:01 +04:30 committed by Ali Mohammad Pur
parent 827d94939b
commit 8ce015742d

View file

@ -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;
}