Pārlūkot izejas kodu

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?

Manuel Novoa III 23 gadi atpakaļ
vecāks
revīzija
88f22c726a
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      libc/stdio/printf.c

+ 1 - 0
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) {