mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:18:13 +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
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…
Add table
Add a link
Reference in a new issue