diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-07-04 01:57:00 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-07-04 01:57:00 -0400 |
commit | cc44d9f2017855ad29c5c1301e8368158a4c2fa7 (patch) | |
tree | c5b6c526b90e7e6279e9e421eae2098b1418c2ab /src | |
parent | 3d54adbe4752f3aaa61a1be412b6116ff7dd5be1 (diff) | |
download | musl-cc44d9f2017855ad29c5c1301e8368158a4c2fa7.tar.gz musl-cc44d9f2017855ad29c5c1301e8368158a4c2fa7.tar.bz2 musl-cc44d9f2017855ad29c5c1301e8368158a4c2fa7.tar.xz musl-cc44d9f2017855ad29c5c1301e8368158a4c2fa7.zip |
zero precision with zero value should not inhibit prefix/width printing
Diffstat (limited to 'src')
-rw-r--r-- | src/stdio/vfprintf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 2c4fdf3d..67660121 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -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; |