Skip to content

Commit 479946f

Browse files
committed
Fix: incorrect bound check in Interval.minus
1 parent 4e2a516 commit 479946f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kotlinx.interval/src/commonMain/kotlin/Interval.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ open class Interval<T : Comparable<T>, TSize : Comparable<TSize>>(
134134

135135
// If the interval to subtract ends before the end of this interval, add the remaining upper bound chunk.
136136
val upperCompare: Int = upperBound.compareTo( toSubtract.upperBound )
137-
if ( upperCompare > 0 || ( upperCompare == 0 && isUpperBoundIncluded && !toSubtract.isEndIncluded ) )
137+
if ( upperCompare > 0 || ( upperCompare == 0 && isUpperBoundIncluded && !toSubtract.isUpperBoundIncluded ) )
138138
{
139139
val upperBoundRemnant = Interval(
140140
toSubtract.upperBound, !toSubtract.isUpperBoundIncluded,

0 commit comments

Comments
 (0)