fix: for incorrect characters
This commit is contained in:
parent
64ba76e41a
commit
8bbd36eb89
1 changed files with 2 additions and 2 deletions
|
@ -11,9 +11,9 @@ public class LoginInfoPacket : IPacket
|
||||||
|
|
||||||
public void Deserialize(byte[] data)
|
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
|
// 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()
|
public byte[] Serialize()
|
||||||
|
|
Loading…
Add table
Reference in a new issue