erreur resolue dans precision
This commit is contained in:
11
exemple.txt
Normal file
11
exemple.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
("%.i", 0) : '' [0]
|
||||||
|
JACKPOT : '' [0]
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
% flags width .precision length specifier
|
||||||
|
% 0-#' + * 0..9 .* 0..9 hhhlllLjtz diuxXcsp%efgnEFGaACSo
|
||||||
|
% 0- * 0..9 .* 0..9 diuxXcsp%
|
||||||
|
% #' + hhhlll efgn
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
@@ -108,9 +108,7 @@ char *convert_with_flags(char *s, va_list ap, char *type, int *size)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
if (!(print = ft_flag_transform(s, print, type, size)))
|
if (!(print = ft_flag_transform(s, print, type, size)))
|
||||||
return (NULL);
|
return (NULL);
|
||||||
// ft_putstr(s);
|
|
||||||
free(s);
|
free(s);
|
||||||
s = print;
|
|
||||||
return (print);
|
return (print);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ char *ft_precision(char *s, char *print, char *type)
|
|||||||
{
|
{
|
||||||
precision = ft_atoi(tmp + 1);
|
precision = ft_atoi(tmp + 1);
|
||||||
*tmp = '\0';
|
*tmp = '\0';
|
||||||
while (ft_strchr("#- +'0", *(++s)))
|
while (*s && ft_strchr("#- +'0", *(++s)))
|
||||||
if (*s == '0')
|
if (*s == '0')
|
||||||
*s = '.';
|
*s = '.';
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|||||||
11
temoin.txt
Normal file
11
temoin.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
("%.i", 0) : '' [0]
|
||||||
|
JACKPOT : '' [0]
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
% flags width .precision length specifier
|
||||||
|
% 0-#' + * 0..9 .* 0..9 hhhlllLjtz diuxXcsp%efgnEFGaACSo
|
||||||
|
% 0- * 0..9 .* 0..9 diuxXcsp%
|
||||||
|
% #' + hhhlll efgn
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
Reference in New Issue
Block a user