fix argument count on tokens

This commit is contained in:
Quinten Mennen 2025-03-05 20:05:26 +01:00
parent faeaed6e6d
commit 3ed0e2ae9e

View File

@ -25,6 +25,8 @@ int parser_count_arguments(t_list *list)
while (current) while (current)
{ {
token = ((t_token *)current->content); token = ((t_token *)current->content);
if (redirect_is_delimiter(token))
break ;
if (token->type < 3 && (!prev || ((t_token *)prev->content)->type < 3)) if (token->type < 3 && (!prev || ((t_token *)prev->content)->type < 3))
cmds++; cmds++;
prev = current; prev = current;