Skip to content

Commit

Permalink
TransRead.read: pass on -1 instead of 0xFFFFFFFFFFFFFFFF
Browse files Browse the repository at this point in the history
Passing 0xFFFFFFFFFFFFFFFF to read causes python to complain about:

    OverflowError: cannot fit 'int' into an index-sized integer

Signed-off-by: Jörg Sommer <[email protected]>
  • Loading branch information
jo-so-nx authored and josch committed Jul 16, 2024
1 parent edd5829 commit 48c90d6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/bmaptool/TransRead.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,6 @@ def read(self, size=-1):
necessary.
"""

if size < 0:
size = 0xFFFFFFFFFFFFFFFF
buf = self._f_objs[-1].read(size)
self._pos += len(buf)

Expand Down

0 comments on commit 48c90d6

Please sign in to comment.