diff options
author | Conrad Pankoff <deoxxa@fknsrs.biz> | 2019-09-03 23:19:53 +1000 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-03 15:23:13 +0200 |
commit | 87808e535a6a2ebf8845cc7b420594adc0215c5a (patch) | |
tree | f3e265136eb0556a1b2ba9bc15500386e6fb7d55 /AK | |
parent | 841f1276e6c075b56b24288d483ed4e7fc04437d (diff) | |
download | serenity-87808e535a6a2ebf8845cc7b420594adc0215c5a.zip |
AK: Fix printf %x padding and %p length
Diffstat (limited to 'AK')
-rw-r--r-- | AK/PrintfImplementation.h | 3 |
1 files changed, 2 insertions, 1 deletions
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<typename PutChFunc, typename T> putch(bufptr, '0'); putch(bufptr, 'x'); ret += 2; + width += 2; } if (zeroPad) { @@ -348,7 +349,7 @@ template<typename PutChFunc> 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(); |