diff options
| -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, ' '))) | 
