From eda077e34bb37d263fa05861c9ee555a77a7a192 Mon Sep 17 00:00:00 2001 From: tomoron Date: Sat, 30 Mar 2024 16:45:30 +0100 Subject: [PATCH] parenthese a la fin des arguments de type parenthesis --- srcs/parsing_bonus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/srcs/parsing_bonus.c b/srcs/parsing_bonus.c index 722e6b5..b7b4420 100644 --- a/srcs/parsing_bonus.c +++ b/srcs/parsing_bonus.c @@ -6,7 +6,7 @@ /* By: tomoron +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/27 14:40:44 by tomoron #+# #+# */ -/* Updated: 2024/03/29 18:24:41 by tomoron ### ########.fr */ +/* Updated: 2024/03/30 16:44:47 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -80,7 +80,7 @@ int get_parenthesis_cmd_len(char *cmd) parenthesis += 1 * (-(cmd[len] == ')')); len++; } - return(len); + return(len - 1); } int get_normal_cmd_len(char *cmd) @@ -115,6 +115,8 @@ char *get_cmd_value(char **cmd , t_cmd_type type) len = get_normal_cmd_len(*cmd); res = ft_substr(*cmd, 0, len); (*cmd) += len; + if(type == PAREN) + (*cmd)++; return(res); }