diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-31 19:25:39 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-31 19:25:39 +0200 |
commit | caa35c6770ea21112ccf38d8637d15f2bc717ea6 (patch) | |
tree | 3ceeb87b2ca8038f656c0de588d0dce229558074 /src/s_lcom.c | |
parent | Not too bad (diff) | |
download | 42-minishell-caa35c6770ea21112ccf38d8637d15f2bc717ea6.tar.gz 42-minishell-caa35c6770ea21112ccf38d8637d15f2bc717ea6.tar.bz2 42-minishell-caa35c6770ea21112ccf38d8637d15f2bc717ea6.tar.xz 42-minishell-caa35c6770ea21112ccf38d8637d15f2bc717ea6.tar.zst 42-minishell-caa35c6770ea21112ccf38d8637d15f2bc717ea6.zip |
Stuff to fix
Diffstat (limited to 'src/s_lcom.c')
-rw-r--r-- | src/s_lcom.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/s_lcom.c b/src/s_lcom.c index 773814f..088f625 100644 --- a/src/s_lcom.c +++ b/src/s_lcom.c @@ -127,17 +127,18 @@ t_lcom link->pipes = NULL; if (get_redir(word, &link) != 0) return (NULL); - if (!(words = subst_args(word, link->redir))) + if (!(words = p_subst_args(word, link->redir))) return (NULL); - if (!(words = subst_vars(words, msh))) + if (!(words = p_subst_vars(words, msh))) return (NULL); - words = p_check_first_arg_equals(words); + words = p_check_args_equals(words, msh); if (fill_lcom(words, &link) < 0) { ft_delwords(words); return (NULL); } link->next = NULL; - ft_delwords(words); + if (words[0] != NULL) + ft_delwords(words); return (link); } |