expand buffer until large enough for input bytes (#233)

Fixes an argument out of range error with buffered writing.
Bumps release
This commit is contained in:
Jabin 2020-09-08 03:23:01 +10:00 committed by GitHub
parent bbdb561de8
commit a784b715f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -274,7 +274,7 @@ namespace Server
public void Write(byte[] value, int length)
{
if (m_Index + length > Data.Length)
while (m_Index + length > Data.Length)
Expand();
Buffer.BlockCopy(value, 0, Data, m_Index, length);