Skip to content
Snippets Groups Projects
Commit 2f928797 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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...
parent f3f06e82
No related branches found
No related tags found
No related merge requests found
......@@ -686,8 +686,11 @@ static int dprintf_formatf(
width = p->width;
/* pick up the specified precision */
if(p->flags & FLAGS_PRECPARAM)
if(p->flags & FLAGS_PRECPARAM) {
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)
prec = p->precision;
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment