diff options
Diffstat (limited to '')
-rw-r--r-- | src/p_args.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/p_args.c b/src/p_args.c index 383700f..78cfc06 100644 --- a/src/p_args.c +++ b/src/p_args.c @@ -116,9 +116,10 @@ static uint16_t if (ft_iswhitespace(*ptr) && p_meet_whitespace((char*)word, ptr, mode) == TRUE) { - count += 1; ptr = p_skip_whitespace(ptr); - start[count - 1] = (ptr - word); + start[count] = (ptr - word); + if (*ptr != C_NUL) + count += 1; ptr -= 1; } ptr++; |