mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Let's just log unimplemented printf() format strings
It's too dang frustrating that we actually crash whenever we hit some unimplemented printf specifier. Let's just log the whole format string and carry on as best we can.
This commit is contained in:
parent
715d7a8532
commit
4623811ec3
Notes:
sideshowbarker
2024-07-19 11:23:01 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4623811ec3f
1 changed files with 4 additions and 2 deletions
|
@ -250,6 +250,9 @@ template<typename PutChFunc>
|
|||
if (*p == '%' && *(p + 1)) {
|
||||
one_more:
|
||||
++p;
|
||||
// FIXME: This is just a hack workaround to prevent choking on '.' specifiers
|
||||
if (*p == '.')
|
||||
goto one_more;
|
||||
if (*p == '-') {
|
||||
left_pad = true;
|
||||
if (*(p + 1))
|
||||
|
@ -356,8 +359,7 @@ template<typename PutChFunc>
|
|||
ret += print_hex(putch, bufptr, va_arg(ap, u32), *p == 'P', true, false, true, 8);
|
||||
break;
|
||||
default:
|
||||
dbg() << "printf_internal: Unimplemented format specifier " << *p;
|
||||
ASSERT_NOT_REACHED();
|
||||
dbg() << "printf_internal: Unimplemented format specifier " << *p << " (fmt: " << fmt << ")";
|
||||
}
|
||||
} else {
|
||||
putch(bufptr, *p);
|
||||
|
|
Loading…
Reference in a new issue