From a1ea3754a36e119ce3f2133b65ece1d19d805376 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 2 Nov 2019 10:35:08 +0100 Subject: [PATCH] AK: Handle '%llu' in printf() (unsigned 64-bit integer) I got a warning when using '%Q' since that's non-standard. This patch makes our printf family accept '%llu'. --- AK/PrintfImplementation.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AK/PrintfImplementation.h b/AK/PrintfImplementation.h index 5c8e431d8d..907d03d77a 100644 --- a/AK/PrintfImplementation.h +++ b/AK/PrintfImplementation.h @@ -298,7 +298,10 @@ template break; case 'u': - ret += print_number(putch, bufptr, va_arg(ap, u32), left_pad, zeroPad, fieldWidth); + if (long_qualifiers >= 2) + ret += print_u64(putch, bufptr, va_arg(ap, u64), left_pad, zeroPad, fieldWidth); + else + ret += print_number(putch, bufptr, va_arg(ap, u32), left_pad, zeroPad, fieldWidth); break; case 'Q':