diff options
Diffstat (limited to 'src/systemd/src/basic/strv.c')
| -rw-r--r-- | src/systemd/src/basic/strv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemd/src/basic/strv.c b/src/systemd/src/basic/strv.c index 9da8cece..6f80b317 100644 --- a/src/systemd/src/basic/strv.c +++ b/src/systemd/src/basic/strv.c @@ -255,6 +255,10 @@ char **strv_split(const char *s, const char *separator) { assert(s); + s += strspn(s, separator); + if (isempty(s)) + return new0(char*, 1); + n = 0; FOREACH_WORD_SEPARATOR(word, l, s, separator, state) n++; |