mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-19 17:55:16 +00:00
fix: properly handling minutes
Seconds are only one byte big and not two, so the Minutes start at byte 3 and not 4.
This commit is contained in:
parent
bec6dde076
commit
fb55820e2b
1 changed files with 2 additions and 2 deletions
|
@ -15,14 +15,14 @@ public struct TagPacket : IPacket {
|
|||
MemoryMarshal.Write(data, ref UpdateType);
|
||||
MemoryMarshal.Write(data[1..], ref IsIt);
|
||||
MemoryMarshal.Write(data[2..], ref Seconds);
|
||||
MemoryMarshal.Write(data[4..], ref Minutes);
|
||||
MemoryMarshal.Write(data[3..], ref Minutes);
|
||||
}
|
||||
|
||||
public void Deserialize(ReadOnlySpan<byte> data) {
|
||||
UpdateType = MemoryMarshal.Read<TagUpdate>(data);
|
||||
IsIt = MemoryMarshal.Read<bool>(data[1..]);
|
||||
Seconds = MemoryMarshal.Read<byte>(data[2..]);
|
||||
Minutes = MemoryMarshal.Read<ushort>(data[4..]);
|
||||
Minutes = MemoryMarshal.Read<ushort>(data[3..]);
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
Loading…
Reference in a new issue