mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 13:48:29 +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):
|
def _overlap_range(self, zone, split=False):
|
||||||
zone = self.__zone(zone)
|
zone = self.__zone(zone)
|
||||||
if len(zone) == 0:
|
if not zone:
|
||||||
return 0, 0
|
return 0, 0
|
||||||
|
|
||||||
start = bisect.bisect_left(self.__end, zone.start)
|
start = bisect.bisect_left(self.__end, zone.start)
|
||||||
|
|
Loading…
Add table
Reference in a new issue