From 8bbd36eb89c59f8038bf1d28b8596755a8e3b56d Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Mon, 13 Nov 2023 22:42:31 +0100 Subject: [PATCH] fix: for incorrect characters --- Wonderking/Packets/Incoming/LoginInfoPacket.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Wonderking/Packets/Incoming/LoginInfoPacket.cs b/Wonderking/Packets/Incoming/LoginInfoPacket.cs index 0005eb1..dd9ecdd 100644 --- a/Wonderking/Packets/Incoming/LoginInfoPacket.cs +++ b/Wonderking/Packets/Incoming/LoginInfoPacket.cs @@ -11,9 +11,9 @@ public class LoginInfoPacket : IPacket public void Deserialize(byte[] data) { - this.Username = Encoding.ASCII.GetString(data, 0, 20).TrimEnd('\0'); + this.Username = Encoding.ASCII.GetString(data, 0, 20).TrimEnd('\0').TrimEnd('\n').TrimEnd('\0'); // Remove unnecessary Symbols - this.Password = Encoding.ASCII.GetString(data, 20, 31).TrimEnd('\n').TrimEnd('\0'); + this.Password = Encoding.ASCII.GetString(data, 20, 31).TrimEnd('\0').TrimEnd('\n').TrimEnd('\0'); } public byte[] Serialize()