diff --git a/ex07/ft_find_next_prime.c b/ex07/ft_find_next_prime.c index 8a7e808..ad6c268 100644 --- a/ex07/ft_find_next_prime.c +++ b/ex07/ft_find_next_prime.c @@ -6,7 +6,7 @@ /* By: tosuman +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/30 17:03:18 by tosuman #+# #+# */ -/* Updated: 2023/03/30 17:03:19 by tosuman ### ########.fr */ +/* Updated: 2023/04/01 02:18:35 by tischmid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -82,7 +82,7 @@ int ft_is_prime(int nb) int ft_find_next_prime(int nb) { --nb; - while (++nb) + while (++nb > 0) if (ft_is_prime(nb)) return (nb); return (2);