mirror of
https://github.com/sochix/TLSharp.git
synced 2026-05-07 13:37:50 +00: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
1 changed files with 1 additions and 6 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue