summaryrefslogtreecommitdiffstatshomepage
path: root/py/pfenv_printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/pfenv_printf.c')
-rw-r--r--py/pfenv_printf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/py/pfenv_printf.c b/py/pfenv_printf.c
index 003314e8f5..c0e826a5d2 100644
--- a/py/pfenv_printf.c
+++ b/py/pfenv_printf.c
@@ -146,13 +146,15 @@ int pfenv_vprintf(const pfenv_t *pfenv, const char *fmt, va_list args) {
chrs += pfenv_print_int(pfenv, va_arg(args, int), 1, 10, 'a', flags, fill, width);
break;
case 'x':
- case 'p': // ?
chrs += pfenv_print_int(pfenv, va_arg(args, int), 0, 16, 'a', flags, fill, width);
break;
case 'X':
- case 'P': // ?
chrs += pfenv_print_int(pfenv, va_arg(args, int), 0, 16, 'A', flags, fill, width);
break;
+ case 'p':
+ case 'P': // don't bother to handle upcase for 'P'
+ chrs += pfenv_print_int(pfenv, va_arg(args, mp_uint_t), 0, 16, 'a', flags, fill, width);
+ break;
#if MICROPY_PY_BUILTINS_FLOAT
case 'e':
case 'E':