From d1806d44fae73758fead2dba183b4d9602a8f315 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 14 Nov 2021 03:45:51 -0800 Subject: [PATCH] AK: Swallow 'L' format specifier until it is properly implemented Previously if code attempted to use the format specifier somewhere (Ex: "%#4.3Lg"), the specifier would get dropped and we would just print "g" instead of any value. Now at least we print a value. --- AK/PrintfImplementation.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AK/PrintfImplementation.h b/AK/PrintfImplementation.h index 0af3faf2f0..408733d5d7 100644 --- a/AK/PrintfImplementation.h +++ b/AK/PrintfImplementation.h @@ -467,6 +467,12 @@ ALWAYS_INLINE int printf_internal(PutChFunc putch, char* buffer, const char*& fm if (*(p + 1)) goto one_more; } + if (*p == 'L') { + // TODO: Implement this properly. + // For now just swallow, so the contents are actually rendered. + if (*(p + 1)) + goto one_more; + } if (*p == 'z') { state.size_qualifier = true; if (*(p + 1))