Temporary Update for TLVector Deserialization Bug

This commit is contained in:
Afshin Arani 2016-10-06 14:21:21 +03:30 committed by GitHub
parent cd48986200
commit e626e76a66

View file

@ -43,9 +43,10 @@ namespace TeleSharp.TL
else if (typeof(T).BaseType == typeof(TLObject))
{
int constructor = br.ReadInt32();
object obj = Activator.CreateInstance(typeof(T));
typeof(T).GetMethod("DeserializeBody").Invoke(obj, new object[] { br });
lists.Add((T)Convert.ChangeType(obj,typeof(T)));
Type type = TLContext.getType(constructor);
object obj = Activator.CreateInstance(type);
type.GetMethod("DeserializeBody").Invoke(obj, new object[] { br });
lists.Add((T)Convert.ChangeType(obj, type));
}
}
}