From a0cdc2ae1ad5dcad989ca49101feefeff395e796 Mon Sep 17 00:00:00 2001 From: Eugene Timokhov Date: Sun, 30 Oct 2016 20:26:17 +0300 Subject: [PATCH] Fix TLVector serialization with TLObject --- TeleSharp.TL/TLVector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TeleSharp.TL/TLVector.cs b/TeleSharp.TL/TLVector.cs index bf3d025..08e8ae5 100644 --- a/TeleSharp.TL/TLVector.cs +++ b/TeleSharp.TL/TLVector.cs @@ -81,9 +81,9 @@ namespace TeleSharp.TL } else if (typeof(T).BaseType == typeof(TLObject)) { - var res = (TLObject) (Convert.ChangeType(item, typeof (TLObject))); + var res = (TLObject)(object)item; res.SerializeBody(bw); - } + } } } }