summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_printf_flag_to_atoi.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/ft_printf_flag_to_atoi.c')
-rw-r--r--libft/src/ft_printf_flag_to_atoi.c7
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);