[gobject-introspection] typelib: Fix logic error in previous commit



commit 3cfad15a57bb16cc7a0ee3655c8e0d4bdab0a056
Author: Colin Walters <walters verbum org>
Date:   Mon Apr 8 14:44:32 2013 -0400

    typelib: Fix logic error in previous commit

 girepository/gitypelib.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/girepository/gitypelib.c b/girepository/gitypelib.c
index 10bb98e..f7d07e3 100644
--- a/girepository/gitypelib.c
+++ b/girepository/gitypelib.c
@@ -252,11 +252,16 @@ strsplit_iter_next (StrSplitIter  *iter,
   if (!s)
     return FALSE;
   next = strstr (s, iter->separator);
-  iter->s = next;
   if (next)
-    len = next - s;
+    {
+      iter->s = next + 1;
+      len = next - s;
+    }
   else
-    len = strlen (s);
+    {
+      iter->s = NULL;
+      len = strlen (s);
+    }
   g_string_overwrite_len (&iter->buf, 0, s, (gssize)len);
   *out_val = iter->buf.str;
   return TRUE;


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