mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
software/libbase/vsnprintf: Prefix pointers by "0x"
Set the PRINTF_SPECIAL flag when printing pointers, so they are prefixed by "0x", to match glibc behavior. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
91c9192626
commit
bff23b8f73
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
|
|||
case 'p':
|
||||
if (field_width == -1) {
|
||||
field_width = 2*sizeof(void *);
|
||||
flags |= PRINTF_ZEROPAD;
|
||||
flags |= PRINTF_ZEROPAD | PRINTF_SPECIAL;
|
||||
}
|
||||
str = number(str, end,
|
||||
(unsigned long) va_arg(args, void *),
|
||||
|
|
Loading…
Reference in a new issue