Skip to content

Commit 8508463

Browse files
committed
Make sure the array is set after a resize.
1 parent d9e547d commit 8508463

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Shared/PooledByteArray.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public void Resize(int length)
3434
var newBytes = _pool.Rent(length);
3535
Buffer.BlockCopy(_bytes, 0, newBytes, 0, _bytes.Length);
3636
_pool.Return(_bytes);
37+
_bytes = newBytes;
3738
}
3839

3940
public byte[] ToUnpooledArray(int length)

0 commit comments

Comments
 (0)