From 6e0d7288e81a359c589b89ea20625910f75a43c3 Mon Sep 17 00:00:00 2001 From: Etienne Rey-bethbeder Date: Tue, 28 Feb 2023 14:36:07 +0100 Subject: [PATCH] ESGIbdurifjjkigjikdthijir --- utils/ft_atoi_check.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/ft_atoi_check.c b/utils/ft_atoi_check.c index ba7d097..1a9e360 100644 --- a/utils/ft_atoi_check.c +++ b/utils/ft_atoi_check.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/07/21 08:21:05 by erey-bet #+# #+# */ -/* Updated: 2022/12/08 16:37:19 by erey-bet ### ########.fr */ +/* Updated: 2023/02/28 13:52:13 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -39,12 +39,12 @@ int ft_atoi_check(const char *nptr) { result = result * 10 + *nptr++ - '0'; if ((result > 2147483647 && sign == 1) - || (result > 2147483648 && sign == -1)) - return (0); + || (result > 2147483647 && sign == 1)) + return (2); } if (*nptr--) - return (0); + return (1); if (*nptr == '-' || *nptr == '+') - return (0); - return (1); + return (1); + return (0); }