mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-02-08 00:30:27 +00:00
Added check for degenerate case in get_entire_style_ranges
This commit is contained in:
parent
c3b6fb252c
commit
1f302f8f5b
@ -450,6 +450,9 @@ class DefaultSegment(object):
|
||||
# split into groups with the same numbers
|
||||
ranges = []
|
||||
last_end = 0
|
||||
if len(groups) == 1 and len(groups[0]) == 0:
|
||||
# check for degenerate case
|
||||
return
|
||||
for group in groups:
|
||||
next_end = last_end + len(group)
|
||||
ranges.append(((last_end, next_end), matches[last_end]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user