This commit is contained in:
2024-04-26 13:47:08 +02:00
parent 6310a99dcb
commit 517f94fe48
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/24 14:51:00 by tomoron #+# #+# */
/* Updated: 2024/04/24 14:59:47 by tomoron ### ########.fr */
/* Updated: 2024/04/26 13:29:23 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
@ -73,7 +73,7 @@ int get_parenthesis_cmd_len(char *cmd)
if (cmd[len] == '"' && !in_quote)
in_dquote = !in_dquote;
if ((cmd[len] == '(' || cmd[len] == ')') && !in_quote && !in_dquote)
parenthesis += 1 * (-(cmd[len] == ')'));
parenthesis += 1 - ((cmd[len] == ')') * 2);
len++;
}
return (len - 1);