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:
Shannon Booth
2024-03-29 17:31:06 +01:00
committed by Andreas Kling
parent a09849072e
commit d725076c7f

View File

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