projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f0c415
)
printf("%#x",0) should print 0 not 0x0
author
Rich Felker
<dalias@aerifal.cx>
Mon, 4 Jul 2011 05:01:58 +0000
(
01:01
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 4 Jul 2011 05:01:58 +0000
(
01:01
-0400)
src/stdio/vfprintf.c
patch
|
blob
|
history
diff --git
a/src/stdio/vfprintf.c
b/src/stdio/vfprintf.c
index f13fbe10576d157684ecfc9d4e8bcf448010cd6d..2c4fdf3d48a920f90f06722f175b89a52ebeb8d3 100644
(file)
--- 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);