[gnome-calendar/gnome-3-36] range: Properly compare ranges
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gnome-3-36] range: Properly compare ranges
- Date: Thu, 16 Apr 2020 19:58:03 +0000 (UTC)
commit 37b794b5938708f9864c596739c08848ec05ad65
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Apr 16 16:15:34 2020 -0300
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.
src/core/gcal-range.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/core/gcal-range.c b/src/core/gcal-range.c
index d64cf3be..9aeb5c7f 100644
--- a/src/core/gcal-range.c
+++ b/src/core/gcal-range.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]