mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-04 20:59:21 +02:00
typelib: Fix logic error in previous commit
This commit is contained in:
11
gitypelib.c
11
gitypelib.c
@@ -252,11 +252,16 @@ strsplit_iter_next (StrSplitIter *iter,
|
|||||||
if (!s)
|
if (!s)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
next = strstr (s, iter->separator);
|
next = strstr (s, iter->separator);
|
||||||
iter->s = next;
|
|
||||||
if (next)
|
if (next)
|
||||||
len = next - s;
|
{
|
||||||
|
iter->s = next + 1;
|
||||||
|
len = next - s;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
len = strlen (s);
|
{
|
||||||
|
iter->s = NULL;
|
||||||
|
len = strlen (s);
|
||||||
|
}
|
||||||
g_string_overwrite_len (&iter->buf, 0, s, (gssize)len);
|
g_string_overwrite_len (&iter->buf, 0, s, (gssize)len);
|
||||||
*out_val = iter->buf.str;
|
*out_val = iter->buf.str;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Reference in New Issue
Block a user