aboutsummaryrefslogtreecommitdiffstats
path: root/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'printf.c')
-rw-r--r--printf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/printf.c b/printf.c
index 83c6d9e..3ec36f4 100644
--- a/printf.c
+++ b/printf.c
@@ -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