diff --git a/src/parse_redir.c b/src/parse_redir.c index 124e72e..2891b47 100644 --- a/src/parse_redir.c +++ b/src/parse_redir.c @@ -94,6 +94,8 @@ int parse_redir(t_shell *shell, t_pak **curr, t_token **token) } else if ((*token)->type == TK_HEREDOC) { + if (shell->heredoc > 2147483646) + shell->heredoc = 0; filename = get_heredoc_file(++(shell->heredoc)); parse_heredoc(shell, curr, token, filename); free(filename);