summaryrefslogtreecommitdiffstats
path: root/src/p_args_len.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-10 18:13:47 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-10 18:13:47 +0200
commitf165808b1cb551cd86655268b8dfa4fb7dcd5eb7 (patch)
tree3014819ceded1fe93093184d4f2211d4eae065a0 /src/p_args_len.c
parentQuick update (diff)
download42-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.c3
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);
}