From 43936f2cd4fc9ebbe72430027734752922869d2b Mon Sep 17 00:00:00 2001 From: tomoron Date: Fri, 29 Mar 2024 18:44:13 +0100 Subject: [PATCH] parsing --- srcs/parsing_bonus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcs/parsing_bonus.c b/srcs/parsing_bonus.c index 79f6cb1..722e6b5 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 16:45:30 by tomoron ### ########.fr */ +/* Updated: 2024/03/29 18:24:41 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,7 +28,7 @@ int check_syntax(char *cmd) if (*cmd == '"' && !in_quote) in_dquote = !in_dquote; if ((*cmd == '(' || *cmd == ')') && !in_quote && !in_dquote) - parenthesis += 1 * (-(*cmd == ')')); + parenthesis += 1 - (2 * (*cmd == ')')); cmd++; } if (in_quote || in_dquote || parenthesis)