Fix for other in ft_vprintf

This commit is contained in:
gbaconni
2022-04-15 00:26:47 +02:00
parent cab84b5f28
commit af87168372
3 changed files with 7 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
/* By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/20 11:43:52 by gbaconni #+# #+# */
/* Updated: 2022/04/13 01:24:00 by gbaconni ### lausanne.ch */
/* Updated: 2022/04/15 00:25:52 by gbaconni ### lausanne.ch */
/* */
/* ************************************************************************** */
@@ -19,9 +19,9 @@ int ft_vprintf(char const *format, va_list ap)
ret = 0;
while (*format)
{
if (*format++ == '%')
if (*format == '%')
{
if (*format == '%')
if (*format++ == '%')
ret += ft_vprintf_percent(format, ap);
else if (*format == 'c')
ret += ft_vprintf_char(format, ap);