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

@@ -42,9 +42,9 @@ int check_unclosed(char *c, t_node *node)
count = 0;
while (cpy)
{
if (!ft_strncmp(&c[0], cpy->val, 1))
if (!ft_strncmp(&c[0], cpy->val, 1) && count >= 0)
count++;
if (!ft_strncmp(&c[1], cpy->val, 1) && count != 0)
if (!ft_strncmp(&c[1], cpy->val, 1))
count--;
cpy = cpy->next;
}