mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Final fix for reading vectors of bare longs (#754)
This commit is contained in:
parent
acd92b100b
commit
fdbab8cc87
@ -45,7 +45,7 @@ class Vector(bytes, TLObject):
|
|||||||
def read(cls, data: BytesIO, t: Any = None, *args: Any) -> List:
|
def read(cls, data: BytesIO, t: Any = None, *args: Any) -> List:
|
||||||
count = Int.read(data)
|
count = Int.read(data)
|
||||||
left = len(data.read())
|
left = len(data.read())
|
||||||
size = left // count
|
size = (left // count) if count else 0
|
||||||
data.seek(-left, 1)
|
data.seek(-left, 1)
|
||||||
|
|
||||||
return List(
|
return List(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user