From b65c07d4307dcf1f4c75fd5caf8de1e7e6188592 Mon Sep 17 00:00:00 2001 From: tomoron Date: Mon, 6 May 2024 11:15:44 +0200 Subject: [PATCH] fix infinit loop when redirection to ( --- srcs/get_len_bonus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcs/get_len_bonus.c b/srcs/get_len_bonus.c index 26a7c2e..5e06dd9 100644 --- a/srcs/get_len_bonus.c +++ b/srcs/get_len_bonus.c @@ -6,7 +6,7 @@ /* By: tomoron +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/24 14:51:00 by tomoron #+# #+# */ -/* Updated: 2024/04/26 13:29:23 by tomoron ### ########.fr */ +/* Updated: 2024/05/06 11:14:51 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ #include "minishell.h" @@ -43,7 +43,8 @@ int get_next_arg_len(char *cmd) in_quote = 0; in_dquote = 0; while (cmd[len] && ((!ft_isspace(cmd[len]) && cmd[len] != '&' - && cmd[len] != '|' && cmd[len] != '<' && cmd[len] != '>') + && cmd[len] != '|' && cmd[len] != '<' && cmd[len] != '>' + && cmd[len] != '(' && cmd[len] != ')') || in_quote || in_dquote)) { if (cmd[len] == '\'' && !in_dquote)