We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71d76a1 commit a29fd7eCopy full SHA for a29fd7e
kc-compat.py
@@ -44,7 +44,7 @@ def _get_last_byte_from(filename):
44
:return: last byte in a file as unsigned int or None if file was empty
45
"""
46
with open(filename, 'rb') as f:
47
- last, = struct.unpack("B", f.read()[-1])
+ last, = struct.unpack("B", f.read()[-1:])
48
return last
49
50
0 commit comments