diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2001-06-13 02:06:36 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2001-06-13 02:06:36 +0000 |
commit | 88f22c726af02e50e0a5ddb4a08ad8a84a1c500a (patch) | |
tree | 8feb7d5cd27ea3ecaa5342b88829411e8ac51c99 | |
parent | dfc5cd9b2e44333d581dfbf033ef399f5ecf8dbb (diff) |
Fix printf handling of %p to prepend "0x" since output is in hex.
Note: glibc output for (void *)0 is "(nil)" while uClibc output is "0".
Does anyone have a preference?
-rw-r--r-- | libc/stdio/printf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c index 91b03b31b..36c23c2fc 100644 --- a/libc/stdio/printf.c +++ b/libc/stdio/printf.c @@ -476,6 +476,7 @@ int vfnprintf(FILE * op, size_t max_size, const char *fmt, va_list ap) if (*p == 'p') { lval = (sizeof(char *) == sizeof(long)); upcase = 0; + flag[FLAG_HASH] = 1; } #if defined(__UCLIBC_HAS_LONG_LONG__) || WANT_LONG_LONG_ERROR if (lval >= 2) { |