feat: set sizeOfServerChannelDat to be const

This commit is contained in:
Timothy Schenk 2023-08-13 01:36:58 +02:00
parent c5e3452b39
commit c6341cb487

View file

@ -26,7 +26,7 @@ public class LoginResponsePacket : IPacket
public byte[] Serialize()
{
var sizeOfServerChannelData = 5;
const int sizeOfServerChannelData = 5;
Span<byte> dataSpan = stackalloc byte[5 + (this.ChannelData.Length * sizeOfServerChannelData)];
dataSpan.Clear();
dataSpan[0] = (byte)this.ResponseReason;