diff options
author | Salad <water_appreciator@protonmail.com> | 2020-12-04 21:40:49 +0100 |
---|---|---|
committer | Salad <water_appreciator@protonmail.com> | 2020-12-04 21:40:49 +0100 |
commit | 46f8585e463d1617bb120894afaec7f51cf85153 (patch) | |
tree | ed4dc8f3c8a719de3fc54a6c228cfc0fdf2653c9 /src/p_redirs.c | |
parent | fix (diff) | |
download | 42-minishell-46f8585e463d1617bb120894afaec7f51cf85153.tar.gz 42-minishell-46f8585e463d1617bb120894afaec7f51cf85153.tar.bz2 42-minishell-46f8585e463d1617bb120894afaec7f51cf85153.tar.xz 42-minishell-46f8585e463d1617bb120894afaec7f51cf85153.tar.zst 42-minishell-46f8585e463d1617bb120894afaec7f51cf85153.zip |
gnu c compiler compatible
Diffstat (limited to 'src/p_redirs.c')
-rw-r--r-- | src/p_redirs.c | 2 |
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; |