From 5c1a6b71a0a991207befc27e46c2886cba3b7243 Mon Sep 17 00:00:00 2001 From: Adam Joly Date: Sun, 26 Nov 2023 15:09:54 +0100 Subject: [PATCH] fuckin printf --- ft_printf.c | 7 +++++-- printfTester | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) create mode 160000 printfTester diff --git a/ft_printf.c b/ft_printf.c index 8425c99..7a8d133 100644 --- a/ft_printf.c +++ b/ft_printf.c @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/17 16:48:37 by adjoly #+# #+# */ -/* Updated: 2023/11/22 14:01:50 by adjoly ### ########.fr */ +/* Updated: 2023/11/26 15:08:59 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -76,7 +76,10 @@ int ft_printf(const char *format, ...) if (format[i] == '%') { i++; - count += ft_printconversion(format[i], args); + if (format[i]) + count += ft_printconversion(format[i], args); + else + return (-1); } else count += ft_putchar(format[i]); diff --git a/printfTester b/printfTester new file mode 160000 index 0000000..d8211af --- /dev/null +++ b/printfTester @@ -0,0 +1 @@ +Subproject commit d8211afbd1f1d8737f6e92d5865a9faea522a3fc