range: Properly compare ranges
The behavior of gcal_range_compare(), and the 'position' argument of gcal_range_calculate_overlap(), should be the same. However, because we were comparing the end dates in the wrong order, they didn't match. Fix that by properly comparing the end of the ranges.
This commit is contained in:
@@ -422,7 +422,7 @@ gcal_range_compare (GcalRange *a,
|
||||
result = compare_func (a->range_start, b->range_start);
|
||||
|
||||
if (result == 0)
|
||||
result = compare_func (b->range_end, a->range_end);
|
||||
result = compare_func (a->range_end, b->range_end);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user