1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:37:45 +00:00

AK: Accept any number of l's as printf format qualifiers.

This isn't entirely correct and will catch a bunch of things it's not
supposed to, but it works for now.
This commit is contained in:
Andreas Kling 2019-02-27 08:38:17 +01:00
parent e421c10735
commit 711e2b2651

View file

@ -150,6 +150,7 @@ template<typename PutChFunc>
bool leftPad = false; bool leftPad = false;
bool zeroPad = false; bool zeroPad = false;
unsigned fieldWidth = 0; unsigned fieldWidth = 0;
unsigned long_qualifiers = 0;
if (*p == '%' && *(p + 1)) { if (*p == '%' && *(p + 1)) {
one_more: one_more:
++p; ++p;
@ -169,6 +170,10 @@ one_more:
if (*(p + 1)) if (*(p + 1))
goto one_more; goto one_more;
} }
if (*p == 'l') {
++long_qualifiers;
goto one_more;
}
switch( *p ) switch( *p )
{ {
case 's': case 's':