Skip to content

Commit

Permalink
expand buffer until large enough for input bytes (#233)
Browse files Browse the repository at this point in the history
Fixes an argument out of range error with buffered writing.
Bumps release
  • Loading branch information
jabinb authored Sep 7, 2020
1 parent bbdb561 commit a784b71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Projects/Server/Serialization/BufferedFileWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public void Write(byte[] value)

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);
Expand Down

0 comments on commit a784b71

Please sign in to comment.