diff options
author | wrmr | 2024-11-09 02:27:28 -0500 |
---|---|---|
committer | wrmr | 2024-11-09 02:27:28 -0500 |
commit | e05b80abcba62ce379de8cea23f38b0b2af68498 (patch) | |
tree | c98362280e842c56631f1cbc24efdc6a0b4f4f76 /str.c | |
parent | 4ca7853b000048514f5bf18391db2e66f65d1377 (diff) |
fix counting dest->n == 0 as end-of-src in strv_split
Diffstat (limited to 'str.c')
-rw-r--r-- | str.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/str.c b/str.c index e0ea194..1c09f11 100644 --- a/str.c +++ b/str.c @@ -56,7 +56,7 @@ int strv_split(strv_t *src, int chr, strv_t *dest) { }; src->s = c ? c + 1 : &src->s[src->n]; src->n -= dest->n + !!c; - return dest->n > 0; + return (src->n + dest->n) > 0; } char strv_next(strv_t *s) { |