1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:57:35 +00:00

AK: Fix printf %x padding and %p length

This commit is contained in:
Conrad Pankoff 2019-09-03 23:19:53 +10:00 committed by Andreas Kling
parent 841f1276e6
commit 87808e535a

View file

@ -39,6 +39,7 @@ template<typename PutChFunc, typename T>
putch(bufptr, '0'); putch(bufptr, '0');
putch(bufptr, 'x'); putch(bufptr, 'x');
ret += 2; ret += 2;
width += 2;
} }
if (zeroPad) { if (zeroPad) {
@ -348,7 +349,7 @@ template<typename PutChFunc>
case 'P': case 'P':
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; break;
default: default:
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();