diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-10 18:13:47 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-10 18:13:47 +0200 |
commit | f165808b1cb551cd86655268b8dfa4fb7dcd5eb7 (patch) | |
tree | 3014819ceded1fe93093184d4f2211d4eae065a0 /src/p_args_len.c | |
parent | Quick update (diff) | |
download | 42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.gz 42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.bz2 42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.xz 42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.zst 42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.zip |
FIX
Diffstat (limited to '')
-rw-r--r-- | src/p_args_len.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/p_args_len.c b/src/p_args_len.c index 3e5bfbf..e624b37 100644 --- a/src/p_args_len.c +++ b/src/p_args_len.c @@ -49,7 +49,8 @@ size_t terminate = p_meet_whitespace(word, ptr, mode); ptr++; } - ptr -= 1; + if (*ptr != C_NUL) + ptr -= 1; return (ptr - word); } |