1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

fix the treatment of the parameter-based precision, as in "%.*s%s" as

previously the second %s would wrongly get the numerical argument that is used
for the variable precision for the first %s...
This commit is contained in:
Daniel Stenberg 2007-11-20 10:03:33 +00:00
parent f3f06e823c
commit 2f928797cf

View File

@ -686,8 +686,11 @@ static int dprintf_formatf(
width = p->width; width = p->width;
/* pick up the specified precision */ /* pick up the specified precision */
if(p->flags & FLAGS_PRECPARAM) if(p->flags & FLAGS_PRECPARAM) {
prec = vto[p->precision].data.num; prec = vto[p->precision].data.num;
param_num++; /* since the precision is extraced from a parameter, we
must skip that to get to the next one properly */
}
else if(p->flags & FLAGS_PREC) else if(p->flags & FLAGS_PREC)
prec = p->precision; prec = p->precision;
else else