Skip to content

Commit

Permalink
1.2.2
Browse files Browse the repository at this point in the history
 Fixed rare index out of range error in AddChannel.
  • Loading branch information
FirstGearGames committed Apr 6, 2022
1 parent 7d81040 commit 671d41f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions FishNet/Plugins/Bayou/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.2.2
- Fixed rare index out of range error in AddChannel.

1.2.1
- More fixes to support Multipass transport.
- Removed ServerBindAddress as it was not being used.
Expand Down
2 changes: 1 addition & 1 deletion FishNet/Plugins/Bayou/Core/CommonSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ internal void AddChannel(ref Packet packet)
byte[] array = packet.Data;
int dataLength = packet.Data.Length;
//Need to resize to fit channel write. This will virtually never happen.
if (dataLength < writePosition)
if (dataLength <= writePosition)
Array.Resize(ref array, dataLength + 1);

array[writePosition] = (byte)packet.Channel;
Expand Down
2 changes: 1 addition & 1 deletion FishNet/Plugins/Bayou/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.1
1.2.2

0 comments on commit 671d41f

Please sign in to comment.