mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Temporary Update for TLVector Deserialization Bug
This commit is contained in:
parent
cd48986200
commit
e626e76a66
|
|
@ -43,9 +43,10 @@ namespace TeleSharp.TL
|
||||||
else if (typeof(T).BaseType == typeof(TLObject))
|
else if (typeof(T).BaseType == typeof(TLObject))
|
||||||
{
|
{
|
||||||
int constructor = br.ReadInt32();
|
int constructor = br.ReadInt32();
|
||||||
object obj = Activator.CreateInstance(typeof(T));
|
Type type = TLContext.getType(constructor);
|
||||||
typeof(T).GetMethod("DeserializeBody").Invoke(obj, new object[] { br });
|
object obj = Activator.CreateInstance(type);
|
||||||
lists.Add((T)Convert.ChangeType(obj,typeof(T)));
|
type.GetMethod("DeserializeBody").Invoke(obj, new object[] { br });
|
||||||
|
lists.Add((T)Convert.ChangeType(obj, type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue