mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibWeb: Fix a silly mistake for bitLength 64 in conversion to int
Which was resulting in 32 bit numbers getting the max array like index instead of 64 bit numbers!
This commit is contained in:
committed by
Andreas Kling
parent
a09849072e
commit
d725076c7f
@@ -341,7 +341,7 @@ JS::ThrowCompletionOr<T> convert_to_int(JS::VM& vm, JS::Value value, EnforceRang
|
||||
double lower_bound = 0;
|
||||
|
||||
// 1. If bitLength is 64, then:
|
||||
if constexpr (sizeof(T) == 4) {
|
||||
if constexpr (sizeof(T) == 8) {
|
||||
// 1. Let upperBound be 2^(53) − 1
|
||||
upper_bound = JS::MAX_ARRAY_LIKE_INDEX;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user