0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-25 04:35:18 +00:00

Don't substring, it crashes

This commit is contained in:
Sanae 2022-02-15 14:39:34 -06:00
parent f0c3ae6963
commit 57560a9db1

View file

@ -160,7 +160,7 @@ public class Server {
MemoryMarshal.Write(tempBuffer.Memory.Span, ref connectHeader);
ConnectPacket connectPacket = new ConnectPacket {
ConnectionType = ConnectionTypes.FirstConnection, // doesn't matter what it is :)
ClientName = other.Name[..Constants.CostumeNameSize]
ClientName = other.Name
};
connectPacket.Serialize(tempBuffer.Memory.Span[Constants.HeaderSize..]);
await client.Send(tempBuffer.Memory, null);