From c6341cb487bc133e91f22acb4e3c674f7f5b6f49 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Sun, 13 Aug 2023 01:36:58 +0200 Subject: [PATCH] feat: set sizeOfServerChannelDat to be const --- Server/Packets/Outgoing/LoginResponsePacket.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/Packets/Outgoing/LoginResponsePacket.cs b/Server/Packets/Outgoing/LoginResponsePacket.cs index db1199a..eb2b471 100644 --- a/Server/Packets/Outgoing/LoginResponsePacket.cs +++ b/Server/Packets/Outgoing/LoginResponsePacket.cs @@ -26,7 +26,7 @@ public class LoginResponsePacket : IPacket public byte[] Serialize() { - var sizeOfServerChannelData = 5; + const int sizeOfServerChannelData = 5; Span dataSpan = stackalloc byte[5 + (this.ChannelData.Length * sizeOfServerChannelData)]; dataSpan.Clear(); dataSpan[0] = (byte)this.ResponseReason;