summaryrefslogtreecommitdiffstats
path: root/src/p_redirs.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-12-16 17:05:38 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-12-16 17:05:38 +0100
commitb3921e090a3b900240e81ada562438f74ffc5b4d (patch)
tree7c6ec7c356b5144b4e0ca0cd6aeab44c2bfa64dd /src/p_redirs.c
parentFix (diff)
download42-minishell-b3921e090a3b900240e81ada562438f74ffc5b4d.tar.gz
42-minishell-b3921e090a3b900240e81ada562438f74ffc5b4d.tar.bz2
42-minishell-b3921e090a3b900240e81ada562438f74ffc5b4d.tar.xz
42-minishell-b3921e090a3b900240e81ada562438f74ffc5b4d.tar.zst
42-minishell-b3921e090a3b900240e81ada562438f74ffc5b4d.zip
Merge
Diffstat (limited to 'src/p_redirs.c')
-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 b1e6914..8b38f44 100644
--- a/src/p_redirs.c
+++ b/src/p_redirs.c
@@ -129,7 +129,7 @@ static unsigned char p_get_redir(char word[],
fd_rdr[RDR] = (fd_rdr[RDR] == -2 && *(ptr + 2) == '-') ? (-3) : (fd_rdr[1]);
pos[0] = (fd_rdr[FD] == STDOUT_FILENO) ?
(ptr - word) : ((ptr - word) - ft_intlen(fd_rdr[FD]));
- pos[0] = (fd_rdr[FD] == -2) ? ((ptr - word) - 1) : (pos[0]);
+ pos[0] = (fd_rdr[FD] == -2) ? (size_t)((ptr - word) - 1) : (pos[0]);
fd_rdr[FD] = (fd_rdr[FD] == -2) ? (STDOUT_FILENO) : (fd_rdr[FD]);
tmp.word = word;
tmp.ptr = ptr;