Skip to content

Commit

Permalink
Fixed ArrayWriter memory expansion condition
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed May 1, 2023
1 parent a7da295 commit 9f9bc75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HotChocolate/Utilities/src/Utilities/ArrayWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private void EnsureBufferCapacity(int neededCapacity)

// if that new buffer size is not enough to satisfy the needed capacity
// we add the needed capacity to the doubled buffer capacity.
if (neededCapacity > buffer.Length)
if (neededCapacity > newSize)
{
newSize += neededCapacity;
}
Expand Down

0 comments on commit 9f9bc75

Please sign in to comment.