[gnome-calendar] range: Properly compare ranges



commit d2da70fb285693384bae3c27f658f851a91ee0dc
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]