[gnome-builder] search: fix comparator



commit 4c1c6910033fea5a15d2dfc7f91645c1fbf3c0a3
Author: Christian Hergert <chergert redhat com>
Date:   Fri Sep 24 11:01:03 2021 -0700

    search: fix comparator

 src/libide/search/ide-search-result.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/search/ide-search-result.c b/src/libide/search/ide-search-result.c
index 3d6385b58..ce3b44141 100644
--- a/src/libide/search/ide-search-result.c
+++ b/src/libide/search/ide-search-result.c
@@ -172,9 +172,9 @@ ide_search_result_compare (gconstpointer a,
   if (ret == 0)
     {
       if (priva->score < privb->score)
-        priva->score = -1;
+        ret = -1;
       else if (priva->score > privb->score)
-        priva->score = 1;
+        ret = 1;
     }
 
   return ret;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]