Skip to content

Commit

Permalink
Merge pull request #28 from imerr/patch-1
Browse files Browse the repository at this point in the history
fix: SendUnreliable respects ArraySegment.Offset
  • Loading branch information
vis2k authored Jan 6, 2022
2 parents 4f9b97f + 8e6ab12 commit fa297ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kcp2k/Assets/kcp2k/highlevel/KcpConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ void SendUnreliable(ArraySegment<byte> message)
{
// copy channel header, data into raw send buffer, then send
rawSendBuffer[0] = (byte)KcpChannel.Unreliable;
Buffer.BlockCopy(message.Array, 0, rawSendBuffer, 1, message.Count);
Buffer.BlockCopy(message.Array, message.Offset, rawSendBuffer, 1, message.Count);
RawSend(rawSendBuffer, message.Count + 1);
}
// otherwise content is larger than MaxMessageSize. let user know!
Expand Down

0 comments on commit fa297ac

Please sign in to comment.