Skip to content

Commit

Permalink
Use correct ExceptionArgument value in System.IO.Pipelines (#105418)
Browse files Browse the repository at this point in the history
  • Loading branch information
xtqqczze authored Jul 25, 2024
1 parent 5aa4945 commit d9d7b6a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ internal Memory<byte> GetMemory(int sizeHint)

if (sizeHint < 0)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.minimumSize);
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.sizeHint);
}

AllocateWriteHeadIfNeeded(sizeHint);
Expand All @@ -149,7 +149,7 @@ internal Span<byte> GetSpan(int sizeHint)

if (sizeHint < 0)
{
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.minimumSize);
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.sizeHint);
}

AllocateWriteHeadIfNeeded(sizeHint);
Expand Down

0 comments on commit d9d7b6a

Please sign in to comment.