Ensure the maximum of either ranges is preserved
This commit is contained in:
parent
f24e8f0631
commit
c6f6b6f49c
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ public final class RangeUtil {
|
|||
var last = out.getLast();
|
||||
if (last.getMaximum() >= range.getMinimum() -1) {
|
||||
out.removeLast();
|
||||
out.add(Range.between(last.getMinimum(), range.getMaximum()));
|
||||
out.add(Range.between(last.getMinimum(), Math.max(last.getMaximum(), range.getMaximum())));
|
||||
} else {
|
||||
out.add(range);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue