Fix "Non-negative number" issue with large bytes fields

This commit is contained in:
Wizou 2021-09-18 02:30:12 +02:00
parent e0556af742
commit 3918362743

View file

@ -204,7 +204,7 @@ namespace TL
bytes = reader.ReadBytes(length);
else
{
length = reader.ReadInt16() + (reader.ReadByte() << 16);
length = reader.ReadUInt16() + (reader.ReadByte() << 16);
bytes = reader.ReadBytes(length);
length += 3;
}