]> Untitled Git - axy/ft/pushswap.git/commitdiff
Misc fixes
author= <=>
Fri, 19 Dec 2025 13:12:35 +0000 (14:12 +0100)
committer= <=>
Fri, 19 Dec 2025 13:12:35 +0000 (14:12 +0100)
main_checker.c

index 69047e67834874d2bd92b9f48713411c212244f5..e3d3d274ae9ead19ddf6baf76950e825160b0a6a 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: clefrere <clefrere@student.42.fr>          +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2025/12/02 22:15:12 by agilliar          #+#    #+#             */
-/*   Updated: 2025/12/19 12:03:38 by agilliar         ###   ########.fr       */
+/*   Updated: 2025/12/19 14:10:56 by agilliar         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -22,14 +22,15 @@ int main(int argc, char **argv)
        t_stacks        stacks;
        int                     i;
        t_ops           ops;
-       t_frac          _disorder;
 
        i = 1;
        stacks = stacks_new();
+       if (argc <= 1)
+               cheatexit(0);
        while (i < argc)
                arg_step(argv[i++], &stacks);
        ops = ops_stackops();
-       output_disorder(&_disorder);
+       compute_disorder(&stacks.a);
        stacks_apply(&stacks, &ops, &algorithm_stdin);
        output_flush();
        eoutput_flush();