Fix TLVector serialization with TLObject

This commit is contained in:
Eugene Timokhov 2016-10-30 20:26:17 +03:00
parent b0b58be25e
commit a0cdc2ae1a

View file

@ -81,7 +81,7 @@ namespace TeleSharp.TL
} }
else if (typeof(T).BaseType == typeof(TLObject)) else if (typeof(T).BaseType == typeof(TLObject))
{ {
var res = (TLObject) (Convert.ChangeType(item, typeof (TLObject))); var res = (TLObject)(object)item;
res.SerializeBody(bw); res.SerializeBody(bw);
} }
} }