feat: set sizeOfServerChannelDat to be const
This commit is contained in:
parent
c5e3452b39
commit
c6341cb487
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue