X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fvfprintf.c;h=4c990e5e54fa730c755206a9c5a6b4c597e8b2a3;hb=13cd969552409e05c941829f2aabb15e2f4d9a1f;hp=2c4fdf3d48a920f90f06722f175b89a52ebeb8d3;hpb=3d54adbe4752f3aaa61a1be412b6116ff7dd5be1;p=musl diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 2c4fdf3d..4c990e5e 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -570,8 +570,11 @@ 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 (p>=0) fl &= ~ZERO_PAD; + if (!arg.i && !p) { + a=z; + break; + } p = MAX(p, z-a + !arg.i); break; case 'c':