diff --git a/Userland/Libraries/LibWeb/Bindings/IDLAbstractOperations.cpp b/Userland/Libraries/LibWeb/Bindings/IDLAbstractOperations.cpp index 66ea40e872..719235546e 100644 --- a/Userland/Libraries/LibWeb/Bindings/IDLAbstractOperations.cpp +++ b/Userland/Libraries/LibWeb/Bindings/IDLAbstractOperations.cpp @@ -72,7 +72,7 @@ ErrorOr get_buffer_source_copy(JS::Object const& buffer_source) auto bytes = TRY(ByteBuffer::create_zeroed(length)); // 9. For i in the range offset to offset + length − 1, inclusive, set bytes[i − offset] to ! GetValueFromBuffer(esArrayBuffer, i, Uint8, true, Unordered). - for (u64 i = offset; i <= offset + length - 1; ++i) { + for (u64 i = offset; i < offset + length; ++i) { auto value = es_array_buffer->get_value(i, true, JS::ArrayBuffer::Unordered); bytes[i - offset] = static_cast(value.as_double()); }