From 020e60aedc3603c0e9ed256d873578209e784401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Cor=C3=A9n?= <2108U9@gmail.com> Date: Sat, 21 Apr 2018 15:34:06 +0200 Subject: [PATCH] Fixed byte count reported by BitWriter --- MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs b/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs index 57433ae..68cc08a 100644 --- a/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs +++ b/MLAPI/NetworkingManagerComponents/Binary/BitWriter.cs @@ -344,6 +344,7 @@ namespace MLAPI.NetworkingManagerComponents.Binary foreach (var element in t as Array) count += GetBitCount(element); } + else if (type == typeof(Partial)) return (byte)Partial.count_info.GetValue(t); else if (IsSupportedType(type)) { long ba = t is bool ? 1 : BytesToRead(t)*8;