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()