zero precision with zero value should not inhibit prefix/width printing
This commit is contained in:
parent
3d54adbe47
commit
cc44d9f201
1 changed files with 4 additions and 1 deletions
|
|
@ -570,7 +570,10 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
|
|||
case 'u':
|
||||
a = fmt_u(arg.i, z);
|
||||
}
|
||||
if (!arg.i && !p) continue;
|
||||
if (!arg.i && !p) {
|
||||
a=z;
|
||||
break;
|
||||
}
|
||||
if (p>=0) fl &= ~ZERO_PAD;
|
||||
p = MAX(p, z-a + !arg.i);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue