Bjege
This commit is contained in:
parent
cca279bf26
commit
9a4a5aa28c
|
@ -6,7 +6,7 @@
|
|||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/12 16:27:59 by erey-bet #+# #+# */
|
||||
/* Updated: 2022/11/21 19:14:36 by erey-bet ### ########.fr */
|
||||
/* Updated: 2022/11/22 22:53:10 by erey-bet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -67,10 +67,12 @@ int ft_printf(const char *str, ...)
|
|||
int i;
|
||||
int count;
|
||||
|
||||
if (str == NULL)
|
||||
return (-1);
|
||||
va_start(args, str);
|
||||
i = 0;
|
||||
i = -1;
|
||||
count = 0;
|
||||
while (str[i])
|
||||
while (str[++i])
|
||||
{
|
||||
if (str[i] == '%' && ft_is_format(str[i + 1]))
|
||||
{
|
||||
|
@ -82,7 +84,6 @@ int ft_printf(const char *str, ...)
|
|||
ft_putchar(str[i]);
|
||||
count++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
va_end(args);
|
||||
return (count);
|
||||
|
|
Loading…
Reference in a new issue