diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-27 15:52:09 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-27 15:52:09 +0200 |
commit | f17ede577f807b76b41ca04934186e1d43cc711a (patch) | |
tree | 382b58b70f3c1bc0519de9b830032f9fd3682aa0 /src/ft_p_lcom_next.c | |
parent | Normed (diff) | |
download | 42-minishell-f17ede577f807b76b41ca04934186e1d43cc711a.tar.gz 42-minishell-f17ede577f807b76b41ca04934186e1d43cc711a.tar.bz2 42-minishell-f17ede577f807b76b41ca04934186e1d43cc711a.tar.xz 42-minishell-f17ede577f807b76b41ca04934186e1d43cc711a.tar.zst 42-minishell-f17ede577f807b76b41ca04934186e1d43cc711a.zip |
More norme
Diffstat (limited to '')
-rw-r--r-- | src/ft_p_lcom_next.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ft_p_lcom_next.c b/src/ft_p_lcom_next.c index 53292ff..07fadbe 100644 --- a/src/ft_p_lcom_next.c +++ b/src/ft_p_lcom_next.c @@ -60,11 +60,11 @@ char return (words); } + char **ft_subst_args(const char word[], int8_t redir) { - /* TODO: norme */ char **words; char *subst; size_t i; @@ -78,11 +78,8 @@ char i = 0; while (word[i] && !ft_ischarset("<>", word[i])) i++; - if (redir > 0) - { - while (ft_isdigit(word[i])) - i--; - } + while (redir > 0 && ft_isdigit(word[i])) + i--; if (!(subst = ft_substr(word, 0, i))) return (NULL); if (!(words = ft_split(subst, ' '))) |