summaryrefslogtreecommitdiffstats
path: root/src/p_args_len.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-11 16:25:51 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-11 16:25:51 +0200
commitb2ffd2aeb4a91501ae7931cb43a9679b01eb0351 (patch)
tree3db47f5b3baed19f9a103ba124098560ddf7ddc4 /src/p_args_len.c
parentTODO update (diff)
download42-minishell-b2ffd2aeb4a91501ae7931cb43a9679b01eb0351.tar.gz
42-minishell-b2ffd2aeb4a91501ae7931cb43a9679b01eb0351.tar.bz2
42-minishell-b2ffd2aeb4a91501ae7931cb43a9679b01eb0351.tar.xz
42-minishell-b2ffd2aeb4a91501ae7931cb43a9679b01eb0351.tar.zst
42-minishell-b2ffd2aeb4a91501ae7931cb43a9679b01eb0351.zip
Nice fix
Diffstat (limited to '')
-rw-r--r--src/p_args_len.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p_args_len.c b/src/p_args_len.c
index e624b37..729e5c5 100644
--- a/src/p_args_len.c
+++ b/src/p_args_len.c
@@ -45,11 +45,11 @@ size_t
mode = u_meet_dquote(word, ptr, mode);
else if (*ptr == C_SQUOTE)
mode = u_meet_squote(word, ptr, mode);
- else if (ft_iswhitespace(*ptr))
+ else if (ft_iswhitespace(*ptr) == TRUE)
terminate = p_meet_whitespace(word, ptr, mode);
ptr++;
}
- if (*ptr != C_NUL)
+ if (terminate == TRUE)
ptr -= 1;
return (ptr - word);
}