diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 19:18:30 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 19:18:30 +0200 |
commit | 4ede84d4ab98c75ed8655607fe64c205b79ed986 (patch) | |
tree | 6f9d5113400faf13a778de0f09c0203c7939b93f /libft/src/ft_printf_flag_to_atoi.c | |
parent | Norm update (diff) | |
download | 42-minishell-4ede84d4ab98c75ed8655607fe64c205b79ed986.tar.gz 42-minishell-4ede84d4ab98c75ed8655607fe64c205b79ed986.tar.bz2 42-minishell-4ede84d4ab98c75ed8655607fe64c205b79ed986.tar.xz 42-minishell-4ede84d4ab98c75ed8655607fe64c205b79ed986.tar.zst 42-minishell-4ede84d4ab98c75ed8655607fe64c205b79ed986.zip |
libft norm in progress
Diffstat (limited to 'libft/src/ft_printf_flag_to_atoi.c')
-rw-r--r-- | libft/src/ft_printf_flag_to_atoi.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 <stddef.h> #include <stdlib.h> -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); |