mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-03-04 01:15:21 +03:00
Prevent trailing 0-bytes at the end of some sent Packet.Data.
This commit is contained in:
parent
2ea6af0324
commit
4e251959b3
@ -136,7 +136,7 @@ namespace Syroot.Worms.Worms2.GameServer
|
||||
Span<byte> dataBytes = stackalloc byte[dataLength];
|
||||
if (!reader.TryCopyTo(dataBytes)) break;
|
||||
reader.Advance(dataLength);
|
||||
packet.Data = Encodings.Windows1252.GetString(dataBytes);
|
||||
packet.Data = Encodings.Windows1252.GetZeroTerminatedString(dataBytes);
|
||||
consumedTo = reader.Position;
|
||||
goto case PacketField.Error;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user