From d0462e6a3c9f6fd1945ab536ced5bbfed63eb56f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 8 Apr 2013 14:44:32 -0400 Subject: [PATCH] typelib: Fix logic error in previous commit --- gitypelib.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gitypelib.c b/gitypelib.c index 10bb98e09..f7d07e3f8 100644 --- a/gitypelib.c +++ b/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;