| Index: nih/string.c
|
| diff --git a/nih/string.c b/nih/string.c
|
| index ff38fdd33778e9001c666d0ca0e316a8b0651057..b7d59e3665b23d377f5b7679ec7cac21381a96bf 100644
|
| --- a/nih/string.c
|
| +++ b/nih/string.c
|
| @@ -405,9 +405,12 @@ nih_str_split (const void *parent,
|
| const char *ptr;
|
|
|
| /* Skip initial delimiters */
|
| - while (repeat && strchr (delim, *str))
|
| + while (repeat && *str && strchr (delim, *str))
|
| str++;
|
|
|
| + if (! *str)
|
| + break;
|
| +
|
| /* Find the end of the token */
|
| ptr = str;
|
| while (*str && (! strchr (delim, *str)))
|
|
|