From 77d7bb8c0c98a6ca4a99cb3df1f3438d88b7ba39 Mon Sep 17 00:00:00 2001 From: Afshin Arani Date: Fri, 13 Apr 2018 01:27:26 +0430 Subject: [PATCH] Use ToArray instead of GetBuffer Buffer normally contain lots of extra zero bytes --- TeleSharp.TL/TLObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TeleSharp.TL/TLObject.cs b/TeleSharp.TL/TLObject.cs index 3bc1476..f398ddf 100644 --- a/TeleSharp.TL/TLObject.cs +++ b/TeleSharp.TL/TLObject.cs @@ -31,7 +31,7 @@ namespace TeleSharp.TL Serialize(bw); bw.Close(); m.Close(); - return m.GetBuffer(); + return m.ToArray(); } } public void Serialize(BinaryWriter writer)