[gnome-builder] code-index: fix infinte loop in binary search



commit fb924f1493be40e156560ed2a3b6f460078d45a7
Author: Christian Hergert <chergert redhat com>
Date:   Fri Sep 1 15:22:40 2017 -0700

    code-index: fix infinte loop in binary search
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786700

 plugins/code-index/ide-persistent-map.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/code-index/ide-persistent-map.c b/plugins/code-index/ide-persistent-map.c
index a3f4baf..7c76ec4 100644
--- a/plugins/code-index/ide-persistent-map.c
+++ b/plugins/code-index/ide-persistent-map.c
@@ -274,7 +274,10 @@ ide_persistent_map_lookup_value (IdePersistentMap *self,
       else if (cmp > 0)
         l = m + 1;
       else
-        value = g_variant_get_child_value (self->values, self->kvpairs [m].value);
+        {
+          value = g_variant_get_child_value (self->values, self->kvpairs [m].value);
+          break;
+        }
     }
 
   if (value != NULL && self->byte_order != G_BYTE_ORDER)


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