Skip to content

Commit b86a1b8

Browse files
committed
fix failed test.
1 parent 3b60399 commit b86a1b8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

msgpack/fallback.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ def unpackb(packed, **kwargs):
128128

129129
if sys.version < (2, 7, 6):
130130
def _unpack_from(f, b, o=0):
131-
return struct.unpack_from(f, bytes(b[:o+2]), o)
131+
"""Explicit typcast for legacy struct.unpack_from"""
132+
return struct.unpack_from(f, bytes(b), o)
132133
else:
133134
_unpack_from = struct.unpack_from
134135

0 commit comments

Comments
 (0)