py/mpprint: Fix "%x" vs "%X" regression introduced in previous commit.

This commit is contained in:
Paul Sokolovsky 2017-12-07 10:31:14 +02:00
parent 5a10e63543
commit f5e097021c
1 changed files with 1 additions and 1 deletions

View File

@ -511,7 +511,7 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) {
break; break;
case 'x': case 'x':
case 'X': { case 'X': {
char fmt_c = 'x' - *fmt + 'A'; char fmt_c = *fmt - 'X' + 'A';
mp_uint_t val; mp_uint_t val;
if (long_arg) { if (long_arg) {
val = va_arg(args, unsigned long int); val = va_arg(args, unsigned long int);