Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix behavior for new issue
  • Loading branch information
hrrrrustic committed Jul 12, 2021
commit 0f43edbb332b530cda898d256e766c58fba03dc4
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,12 @@ public int IndexOfAny(char[] anyOf, int startIndex, int count)

if (HasValue)
{
if (startIndex < 0 || Offset + startIndex > Buffer.Length)
if (startIndex < 0 || startIndex > Length)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.start);
}

if (count < 0 || Offset + startIndex + count > Buffer.Length)
if (count < 0 || startIndex + count > Length)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count);
}
Expand Down