Skip to content

Commit

Permalink
Merge pull request #573 from caioavidal/fix/network_message_reset
Browse files Browse the repository at this point in the history
fix: reset cursor in network message
  • Loading branch information
MarcusViniciusSS authored Feb 7, 2024
2 parents 5147f8a + ea08b2a commit aff0614
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public NetworkMessage(int length = 0) : base(new byte[16394], length)
_cursor = length;
}

public override void Reset()
{
base.Reset();
_cursor = 0;
}

/// <summary>
/// Inserts a location point on the buffer
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void Resize(int length)
BytesRead = 0;
}

public void Reset()
public virtual void Reset()
{
Buffer = new byte[16394];
BytesRead = 0;
Expand Down

0 comments on commit aff0614

Please sign in to comment.