mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-26 16:31:58 +00:00
FIX; add error for invalid flag in bonus
This commit is contained in:
@@ -58,16 +58,14 @@ static int tester(t_stacks *stacks)
|
||||
while (buf)
|
||||
{
|
||||
if (!apply_operation(stacks, buf))
|
||||
break ;
|
||||
{
|
||||
secure_write(2, "Error\n", 6);
|
||||
return (0);
|
||||
}
|
||||
free(buf);
|
||||
buf = get_next_line(0);
|
||||
}
|
||||
if (!is_stacks_b_empty(stacks))
|
||||
{
|
||||
secure_write(1, "KO\n", 3);
|
||||
return (0);
|
||||
}
|
||||
if (!check_order(stacks->a))
|
||||
if (!is_stacks_b_empty(stacks) || !check_order(stacks->a))
|
||||
{
|
||||
secure_write(1, "KO\n", 3);
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user