mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 06:33:03 +00:00
m1n1.utils: Fix len() overflow in RangeMap
This is to fix OverflowError: Python int too large to convert to C ssize_t in case the upper bound of a range is 1<<64. Signed-off-by: Martin Povišer <povik@cutebit.org>
This commit is contained in:
parent
7db691737e
commit
020d86a23f
1 changed files with 1 additions and 1 deletions
|
@ -519,7 +519,7 @@ class RangeMap(Reloadable):
|
|||
|
||||
def _overlap_range(self, zone, split=False):
|
||||
zone = self.__zone(zone)
|
||||
if len(zone) == 0:
|
||||
if not zone:
|
||||
return 0, 0
|
||||
|
||||
start = bisect.bisect_left(self.__end, zone.start)
|
||||
|
|
Loading…
Reference in a new issue