Skip to content

Commit cd03239

Browse files
Fix assertion
1 parent 76d058f commit cd03239

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Runtime/Library/JavascriptArray.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9402,9 +9402,8 @@ using namespace Js;
94029402
}
94039403
else
94049404
{
9405-
Assert(fromVal < MaxArrayLength);
9406-
Assert(toVal < MaxArrayLength);
9407-
Assert(direction == -1 || (fromVal + count < MaxArrayLength && toVal + count < MaxArrayLength));
9405+
Assert(direction != -1 || (fromVal < MaxArrayLength && toVal < MaxArrayLength));
9406+
Assert(fromVal + count <= MaxArrayLength && toVal + count <= MaxArrayLength);
94089407

94099408
uint32 fromIndex = static_cast<uint32>(fromVal);
94109409
uint32 toIndex = static_cast<uint32>(toVal);

0 commit comments

Comments
 (0)