From 88f22c726af02e50e0a5ddb4a08ad8a84a1c500a Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Wed, 13 Jun 2001 02:06:36 +0000 Subject: 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? --- libc/stdio/printf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libc') 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) { -- cgit v1.2.3