From 87808e535a6a2ebf8845cc7b420594adc0215c5a Mon Sep 17 00:00:00 2001 From: Conrad Pankoff Date: Tue, 3 Sep 2019 23:19:53 +1000 Subject: [PATCH] AK: Fix printf %x padding and %p length --- AK/PrintfImplementation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AK/PrintfImplementation.h b/AK/PrintfImplementation.h index 333a3210f2..9e8398163a 100644 --- a/AK/PrintfImplementation.h +++ b/AK/PrintfImplementation.h @@ -39,6 +39,7 @@ template putch(bufptr, '0'); putch(bufptr, 'x'); ret += 2; + width += 2; } if (zeroPad) { @@ -348,7 +349,7 @@ template case 'P': case 'p': - ret += print_hex(putch, bufptr, va_arg(ap, u32), *p == 'P', true, false, true, 8); + ret += print_hex(putch, bufptr, va_arg(ap, u32), *p == 'P', true, true, true, 8); break; default: ASSERT_NOT_REACHED();