Commit fa404a47 authored by abenoit's avatar abenoit
Browse files

exit no args fix

parent 94a50b82
......@@ -5,9 +5,12 @@ static int launch_exit(char **args, t_xe *xe)
{
if (args != NULL)
{
if (ft_arraylen(args) != 2)
if (ft_arraylen(args) > 2)
return (EXIT_ARG_ERR);
xe->stat_loc = ft_atoi(args[1]) % 256;
if (args[1] != NULL)
xe->stat_loc = ft_atoi(args[1]) % 256;
else
xe->stat_loc = 0;
}
return (FT_EXIT);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment