From fdbab8cc87ea6363e1c3358647abd758b5717e90 Mon Sep 17 00:00:00 2001 From: Davide Galilei <43778739+DavideGalilei@users.noreply.github.com> Date: Sat, 11 Sep 2021 14:52:34 +0200 Subject: [PATCH] Final fix for reading vectors of bare longs (#754) --- pyrogram/raw/core/primitives/vector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/raw/core/primitives/vector.py b/pyrogram/raw/core/primitives/vector.py index b46a7542..c51bbaf3 100644 --- a/pyrogram/raw/core/primitives/vector.py +++ b/pyrogram/raw/core/primitives/vector.py @@ -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(