Skip to content

Commit 29a3bdc

Browse files
committed
Add bounds check comment
1 parent 6f201a8 commit 29a3bdc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Ramstack.Structures/Collections/ArrayView`1.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public ArrayView(T[] array, int index)
8181
[MethodImpl(MethodImplOptions.AggressiveInlining)]
8282
public ArrayView(T[] array, int index, int length)
8383
{
84+
//
85+
// https://github.com/dotnet/runtime/issues/119689
86+
//
8487
if ((uint)index > (uint)array.Length || (uint)length > (uint)(array.Length - index))
8588
ThrowHelper.ThrowArgumentOutOfRangeException();
8689

0 commit comments

Comments
 (0)