Skip to content

Commit 2105cee

Browse files
committed
fixed exit, no invalid read of size now
1 parent 8f74cb5 commit 2105cee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Parser/parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ bool builtin_check(t_main *main)
2020
if (ft_strcmp(main->cmd->cmd, "cd") == 0 && !main->parser->n_pipes)
2121
return (ft_cd(main, argc), true);
2222
else if (ft_strcmp(main->cmd->cmd, "exit") == 0 && (main->cmd->next == NULL
23-
&& !((main->cmd->args[2]) && ft_isnumeric_str(main->cmd->args[1]))))
23+
&& !((main->cmd->args[1]) && main->cmd->args[2] && ft_isnumeric_str(main->cmd->args[1]))))
2424
return (ft_exit(main->cmd, main), true);
2525
else if (ft_strcmp(main->cmd->cmd, "unset") == 0 && main->cmd->next == NULL)
2626
{

0 commit comments

Comments
 (0)