From 4ede84d4ab98c75ed8655607fe64c205b79ed986 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 29 Sep 2020 19:18:30 +0200 Subject: libft norm in progress --- libft/src/ft_printf_flag_to_atoi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libft/src/ft_printf_flag_to_atoi.c') diff --git a/libft/src/ft_printf_flag_to_atoi.c b/libft/src/ft_printf_flag_to_atoi.c index 2f3c6e7..56b3ed8 100644 --- a/libft/src/ft_printf_flag_to_atoi.c +++ b/libft/src/ft_printf_flag_to_atoi.c @@ -14,16 +14,15 @@ #include #include -char - *ft_printf_flag_to_atoi(char *str) +char *ft_printf_flag_to_atoi(char *str) { char *nstr; char *nnstr; int len; - while (*str != '.' && *str) + while (*str != '.' && *str != '\0') str++; - while (*str != '-' && *str) + while (*str != '-' && *str != '\0') str--; len = ft_strlchr(str, ' '); nnstr = ft_substr(str, 0, len); -- cgit v1.2.3