mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibWasm: Allow Limits max value to be equal to 2^k-1
That value fits in k bits, so we should allow it.
This commit is contained in:
parent
612d5f201a
commit
18c5b0f1cc
1 changed files with 1 additions and 1 deletions
|
@ -305,7 +305,7 @@ ErrorOr<void, ValidationError> Validator::validate(Limits const& limits, size_t
|
|||
{
|
||||
auto bound = (1ull << k) - 1;
|
||||
auto check_bound = [bound](auto value) {
|
||||
return static_cast<u64>(value) < bound;
|
||||
return static_cast<u64>(value) <= bound;
|
||||
};
|
||||
|
||||
if (!check_bound(limits.min()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue