diff options
author | Marco Paland <marco@paland.com> | 2017-11-21 14:54:14 +0100 |
---|---|---|
committer | Marco Paland <marco@paland.com> | 2017-11-21 14:54:14 +0100 |
commit | 99021707632120a804a6126a149620c651088eb8 (patch) | |
tree | 77e29dd8f9def28b028e0d39ba514630cdbecf93 /printf.c | |
parent | 2b3f3c13067f0f3f061dcfd7b59b925082e72d0d (diff) | |
download | printf-99021707632120a804a6126a149620c651088eb8.tar.gz printf-99021707632120a804a6126a149620c651088eb8.tar.bz2 printf-99021707632120a804a6126a149620c651088eb8.zip |
Return %p values in upper case, fixed %p 64 bit support
Diffstat (limited to 'printf.c')
-rw-r--r-- | printf.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -549,9 +549,8 @@ static size_t vsnprintf(char* buffer, size_t buffer_len, const char* format, va_ case 'p' : {
width = sizeof(void*) * 2U;
- flags |= FLAGS_ZEROPAD;
- size_t size_void = sizeof(void*);
- if (size_void > sizeof(long)) {
+ flags |= FLAGS_ZEROPAD | FLAGS_UPPERCASE;
+ if (sizeof(void*) == sizeof(long long)) {
#if defined(PRINTF_LONG_LONG_SUPPORT)
idx += _ntoa_long_long(&buffer[idx], (unsigned long long)va_arg(va, void*), false, 16U, buffer_len - idx, precision, width, flags);
#endif
|