deux putstr dans ftprintf et ftconvert pour tenter de comprendre l'erreur du freed
This commit is contained in:
@@ -108,6 +108,7 @@ char *convert_with_flags(char *s, va_list ap, char *type, int *size)
|
||||
return (NULL);
|
||||
if (!(print = ft_flag_transform(s, print, type, size)))
|
||||
return (NULL);
|
||||
// ft_putstr(s);
|
||||
free(s);
|
||||
s = print;
|
||||
return (print);
|
||||
|
||||
@@ -81,7 +81,10 @@ char *ft_convert(va_list ap, char *type, char **s)
|
||||
if ((tmp = ft_strchrset(type, "dic")) && ft_strchr(type, 'l'))
|
||||
return (conv_i(tmp[0], va_arg(ap, long int)));
|
||||
if ((tmp = ft_strchrset(type, "dic")))
|
||||
{
|
||||
// ft_putstr("OK");
|
||||
return (conv_i(tmp[0], va_arg(ap, int)));
|
||||
}
|
||||
if ((tmp = ft_strchrset(type, "uxXps")) && ft_strchrset(type, "lps"))
|
||||
return (conv_u(tmp[0], va_arg(ap, unsigned long int)));
|
||||
if ((tmp = ft_strchrset(type, "uxX")))
|
||||
|
||||
Reference in New Issue
Block a user