Skip to content

Commit 74c4087

Browse files
author
Kevin Smith
committed
[MERGE #6224 @zenparsing] Fix assertion in ArrayBuffer slice
Merge pull request #6224 from zenparsing:arraybuffer-slice-assert Fixes #6220
2 parents 773d8ee + ed3377c commit 74c4087

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Runtime/Library/ArrayBuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ namespace Js
560560
// start and end are clamped to valid indices, so the new length also cannot exceed MaxArrayBufferLength.
561561
// Therefore, should be safe to cast down newLen to uint32.
562562
// TODO: If we ever support allocating ArrayBuffer with byteLength > MaxArrayBufferLength we may need to review this math.
563-
Assert(newLen < MaxArrayBufferLength);
563+
Assert(newLen <= MaxArrayBufferLength);
564564
uint32 byteLength = static_cast<uint32>(newLen);
565565

566566
ArrayBuffer* newBuffer = nullptr;

0 commit comments

Comments
 (0)