[gnome-builder/wip/slaf/xml-pack: 250/254] xml-pack: remove endless loop in completion from rng



commit 6368afeb34f503ae0ad115ac471ca94a6f65d4b6
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Mon Jul 10 16:20:03 2017 +0200

    xml-pack: remove endless loop in completion from rng
    
    If we examine one more time the group, we need
    to reset the define pointer to the group start

 plugins/xml-pack/ide-xml-completion-provider.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/xml-pack/ide-xml-completion-provider.c b/plugins/xml-pack/ide-xml-completion-provider.c
index d3c5792..dc6f189 100644
--- a/plugins/xml-pack/ide-xml-completion-provider.c
+++ b/plugins/xml-pack/ide-xml-completion-provider.c
@@ -603,13 +603,13 @@ is_n_matching (MatchingState *state)
             type == IDE_XML_RNG_DEFINE_ONEORMORE ||
             type == IDE_XML_RNG_DEFINE_OPTIONAL);
 
+  state_stack_push (state);
+
+loop:
   /* Only ZeroOrMore or optionnal match if there's no children */
   if (NULL == (defines = state->define->content))
     return !(type == IDE_XML_RNG_DEFINE_ONEORMORE);
 
-  state_stack_push (state);
-
-loop:
   is_child_matching = TRUE;
   while (defines != NULL)
     {


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