2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 04:48:06 +00:00

Final fix for reading vectors of bare longs (#754)

This commit is contained in:
Davide Galilei 2021-09-11 14:52:34 +02:00 committed by GitHub
parent acd92b100b
commit fdbab8cc87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ class Vector(bytes, TLObject):
def read(cls, data: BytesIO, t: Any = None, *args: Any) -> List:
count = Int.read(data)
left = len(data.read())
size = left // count
size = (left // count) if count else 0
data.seek(-left, 1)
return List(