Use ToArray instead of GetBuffer

Buffer normally contain lots of extra zero bytes
This commit is contained in:
Afshin Arani 2018-04-13 01:27:26 +04:30 committed by Andres G. Aragoneses
parent 4197df89aa
commit fdcb195fbb

View file

@ -31,7 +31,7 @@ namespace TeleSharp.TL
Serialize(bw);
bw.Close();
m.Close();
return m.GetBuffer();
return m.ToArray();
}
}
public void Serialize(BinaryWriter writer)