mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-22 03:05:16 +00:00
Don't substring, it crashes
This commit is contained in:
parent
f0c3ae6963
commit
57560a9db1
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ public class Server {
|
||||||
MemoryMarshal.Write(tempBuffer.Memory.Span, ref connectHeader);
|
MemoryMarshal.Write(tempBuffer.Memory.Span, ref connectHeader);
|
||||||
ConnectPacket connectPacket = new ConnectPacket {
|
ConnectPacket connectPacket = new ConnectPacket {
|
||||||
ConnectionType = ConnectionTypes.FirstConnection, // doesn't matter what it is :)
|
ConnectionType = ConnectionTypes.FirstConnection, // doesn't matter what it is :)
|
||||||
ClientName = other.Name[..Constants.CostumeNameSize]
|
ClientName = other.Name
|
||||||
};
|
};
|
||||||
connectPacket.Serialize(tempBuffer.Memory.Span[Constants.HeaderSize..]);
|
connectPacket.Serialize(tempBuffer.Memory.Span[Constants.HeaderSize..]);
|
||||||
await client.Send(tempBuffer.Memory, null);
|
await client.Send(tempBuffer.Memory, null);
|
||||||
|
|
Loading…
Reference in a new issue