From d725076c7f63e63e72ab080af3663664aa85e793 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Fri, 29 Mar 2024 17:31:06 +0100 Subject: [PATCH] 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! --- Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp b/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp index 0bb5f87e4c..6c3a0f54e6 100644 --- a/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp +++ b/Userland/Libraries/LibWeb/WebIDL/AbstractOperations.cpp @@ -341,7 +341,7 @@ JS::ThrowCompletionOr 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;