mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 00:41:57 +00:00
Merge branch 'master' of github.com:DavidGailleton/42-Push_Swap into fix_bench
This commit is contained in:
@@ -58,16 +58,14 @@ static int tester(t_stacks *stacks)
|
|||||||
while (buf)
|
while (buf)
|
||||||
{
|
{
|
||||||
if (!apply_operation(stacks, buf))
|
if (!apply_operation(stacks, buf))
|
||||||
break ;
|
{
|
||||||
|
secure_write(2, "Error\n", 6);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
free(buf);
|
free(buf);
|
||||||
buf = get_next_line(0);
|
buf = get_next_line(0);
|
||||||
}
|
}
|
||||||
if (!is_stacks_b_empty(stacks))
|
if (!is_stacks_b_empty(stacks) || !check_order(stacks->a))
|
||||||
{
|
|
||||||
secure_write(1, "KO\n", 3);
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
if (!check_order(stacks->a))
|
|
||||||
{
|
{
|
||||||
secure_write(1, "KO\n", 3);
|
secure_write(1, "KO\n", 3);
|
||||||
return (0);
|
return (0);
|
||||||
|
|||||||
Reference in New Issue
Block a user