mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-11-01 08:12:03 +01:00
FIX; add error for invalid flag in bonus
This commit is contained in:
1 parent
e2cbea4df9
commit
798886976c
1 file changed
+5
-7
@@ -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