diff --git a/Userland/Libraries/LibWasm/Parser/Parser.cpp b/Userland/Libraries/LibWasm/Parser/Parser.cpp index bfe32b84a65..43c9a982639 100644 --- a/Userland/Libraries/LibWasm/Parser/Parser.cpp +++ b/Userland/Libraries/LibWasm/Parser/Parser.cpp @@ -190,7 +190,7 @@ ParseResult Limits::parse(InputStream& stream) Optional 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; }