Skip to content

Commit fdbab8c

Browse files
Final fix for reading vectors of bare longs (pyrogram#754)
1 parent acd92b1 commit fdbab8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyrogram/raw/core/primitives/vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def read_bare(b: BytesIO, size: int) -> Union[int, Any]:
4545
def read(cls, data: BytesIO, t: Any = None, *args: Any) -> List:
4646
count = Int.read(data)
4747
left = len(data.read())
48-
size = left // count
48+
size = (left // count) if count else 0
4949
data.seek(-left, 1)
5050

5151
return List(

0 commit comments

Comments
 (0)