fix some errors

This commit is contained in:
Maoake Teriierooiterai
2026-01-15 08:20:38 +01:00
parent 81ed92dc88
commit 52d868904f
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@@ -61,6 +61,7 @@ dkms.conf
push_swap
checker
checker_linux
playtest.sh
# File obj
obj/

View File

@@ -19,7 +19,8 @@ int calcul_mod(int argc, char **argv)
int mod;
mod = 0;
while (argv[mod] && !ft_isdigit(argv[mod][0]) && mod < argc)
while (argv[mod] && !ft_isdigit(argv[mod][0])
&& !ft_isdigit(argv[mod][1]) && argv[mod][1] && mod < argc)
mod++;
mod--;
return (mod);

View File

@@ -18,7 +18,8 @@ void rra(t_stacks *stacks)
if (stacks && stacks->a && stacks->a->previous)
stacks->a = stacks->a->previous;
stacks->rra++;
secure_write(1, "rra\n", 4);
if (stacks->print)
secure_write(1, "rra\n", 4);
}
void rrb(t_stacks *stacks)