diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-07-04 01:01:58 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-07-04 01:01:58 -0400 |
commit | 3d54adbe4752f3aaa61a1be412b6116ff7dd5be1 (patch) | |
tree | 61836b5e6111e8284adbb0743d347763a938f5b9 | |
parent | 2f0c415cebfedff0e4eb49b743a591a4c15d454e (diff) | |
download | musl-3d54adbe4752f3aaa61a1be412b6116ff7dd5be1.tar.gz musl-3d54adbe4752f3aaa61a1be412b6116ff7dd5be1.tar.xz musl-3d54adbe4752f3aaa61a1be412b6116ff7dd5be1.zip |
printf("%#x",0) should print 0 not 0x0
-rw-r--r-- | src/stdio/vfprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index f13fbe10..2c4fdf3d 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -552,7 +552,7 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg, fl |= ALT_FORM; case 'x': case 'X': a = fmt_x(arg.i, z, t&32); - if (fl & ALT_FORM) prefix+=(t>>4), pl=2; + if (arg.i && (fl & ALT_FORM)) prefix+=(t>>4), pl=2; if (0) { case 'o': a = fmt_o(arg.i, z); |