Skip to content

Commit

Permalink
check if second number has been truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
conradtchan committed May 8, 2024
1 parent fc718a1 commit 2191b15
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion backend/backend_ozstar.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,16 @@ def expand_array_range(cls, r):
if ss[1] == "...":
c.append(int(ss[0]))
else:
start = ss[0]
end = ss[1]
if "..." in end:
if end.strip("...") > start:
end = end.strip("...")
else:
# Just append the first number
end = start
# Range may be followed by "...", but is still complete
for j in range(int(ss[0]), int(ss[1].strip("...")) + 1):
for j in range(int(start), int(end) + 1):
c.append(j)
else:
if "..." in i:
Expand Down

0 comments on commit 2191b15

Please sign in to comment.