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
Notes: sideshowbarker 2024-07-18 17:11:50 +09:00

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