diff options
Diffstat (limited to 'ft_printf.c')
| -rw-r--r-- | ft_printf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ft_printf.c b/ft_printf.c index 5bfd2e8..fa9ba1d 100644 --- a/ft_printf.c +++ b/ft_printf.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/29 00:15:28 by cacharle #+# #+# */ -/* Updated: 2019/10/29 05:17:55 by cacharle ### ########.fr */ +/* Updated: 2019/10/29 18:28:15 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,8 @@ int ft_printf(const char *format, ...) int print_len; int i; + if (format == NULL) + return (-1); str = ft_strdup(format); if ((format_list = parse(str)) == NULL) return (-1); |
