thouth it was pushed

This commit is contained in:
gazhonsepaskwa
2025-02-15 09:14:18 +01:00
parent bc365a1796
commit 785e3fdfa0
2 changed files with 7 additions and 3 deletions

View File

@@ -21,7 +21,11 @@ static int parenthesis_error(t_node *cpy)
if (!ft_strncmp(cpy->val, ")", 1) && cpy->next
&& !ft_strncmp(cpy->next->val, "(", 1))
return (syntax_err_mess(cpy->next->val, 0));
if (is_aop_operator(cpy) && !ft_strncmp(cpy->next->val, ")", 1))
if (is_aop_operator(cpy) && cpy->next
&& !ft_strncmp(cpy->next->val, ")", 1))
return (syntax_err_mess(cpy->next->val, 0));
if (cpy->next && !ft_strncmp(cpy->next->val, "(", 1)
&& !is_aop_operator(cpy))
return (syntax_err_mess(cpy->next->val, 0));
return (0);
}