summaryrefslogtreecommitdiffstats
path: root/src/p_redirs.c
diff options
context:
space:
mode:
authorjoe <rbousset@42lyon.fr>2020-11-30 12:19:13 +0100
committerjoe <rbousset@42lyon.fr>2020-11-30 12:19:13 +0100
commit0c82bdaf4f35d6e5b7fdcfb4d1d26c506d933cf8 (patch)
tree8002382465fa9f28a38e9eacf4eb26606882a217 /src/p_redirs.c
parentTODO update (diff)
download42-minishell-0c82bdaf4f35d6e5b7fdcfb4d1d26c506d933cf8.tar.gz
42-minishell-0c82bdaf4f35d6e5b7fdcfb4d1d26c506d933cf8.tar.bz2
42-minishell-0c82bdaf4f35d6e5b7fdcfb4d1d26c506d933cf8.tar.xz
42-minishell-0c82bdaf4f35d6e5b7fdcfb4d1d26c506d933cf8.tar.zst
42-minishell-0c82bdaf4f35d6e5b7fdcfb4d1d26c506d933cf8.zip
Fix
Diffstat (limited to '')
-rw-r--r--src/p_redirs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p_redirs.c b/src/p_redirs.c
index 6ea1e19..b1e6914 100644
--- a/src/p_redirs.c
+++ b/src/p_redirs.c
@@ -94,7 +94,7 @@ static int p_get_fd(const char word[], char *ptr)
tmp = ptr;
tmp -= 1;
if (ft_isdigit(*tmp) == FALSE)
- return (0);
+ return (1);
while ((tmp - word) > 0 && ft_isdigit(*tmp) == TRUE)
tmp--;
if ((tmp - word) > 0 && ft_iswhitespace(*tmp) == FALSE)