mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Removing constructor double write
In "TLObject.Serialize() -> Serialize(BinaryWriter br) -> SerializeBody" code path, constructor get written two times instead of once, which since this code path is currently unused and it's only provided for completeness, It's undetectable while testing.
This commit is contained in:
parent
3ea897402c
commit
a74f8f2252
|
|
@ -27,17 +27,12 @@ namespace TgSharp.TL
|
|||
using (MemoryStream m = new MemoryStream())
|
||||
using (BinaryWriter bw = new BinaryWriter(m))
|
||||
{
|
||||
Serialize(bw);
|
||||
SerializeBody(bw);
|
||||
bw.Close();
|
||||
m.Close();
|
||||
return m.ToArray();
|
||||
}
|
||||
}
|
||||
public void Serialize(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(Constructor);
|
||||
SerializeBody(writer);
|
||||
}
|
||||
public void Deserialize(BinaryReader reader)
|
||||
{
|
||||
int constructorId = reader.ReadInt32();
|
||||
|
|
|
|||
Loading…
Reference in a new issue