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:
Georges Basile Stavracas Neto
2020-04-16 16:15:34 -03:00
parent a790f30176
commit d2da70fb28
+1 -1
View File
@@ -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;
}