]> git.deb.at Git - rhonda/impostor.git/commitdiff
Fix recorder
authorAeonLucid <aeonlucid@outlook.com>
Sun, 1 Nov 2020 17:49:46 +0000 (18:49 +0100)
committerAeonLucid <aeonlucid@outlook.com>
Sun, 1 Nov 2020 22:02:07 +0000 (23:02 +0100)
src/Impostor.Server/Recorder/PacketRecorder.cs

index c145f721dba49f0c00386e765d3783ca85036890..8824415a770e9b992fe3343e1d6edc08c9f4b18c 100644 (file)
@@ -145,8 +145,8 @@ namespace Impostor.Server.Recorder
         {
             context.Writer.Write((byte) messageType);
             context.Writer.Write((byte) reader.Tag);
-            context.Writer.Write((int) reader.Buffer.Length);
-            context.Writer.Write(reader.Buffer);
+            context.Writer.Write((int) reader.Length);
+            context.Writer.Write(reader.Buffer.AsSpan(0, reader.Length));
         }
 
         private static void WriteGameCode(PacketSerializationContext context, in GameCode gameCode)