fix: for incorrect characters

This commit is contained in:
Timothy Schenk 2023-11-13 22:42:31 +01:00
parent 64ba76e41a
commit 8bbd36eb89

View file

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