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:
Andreas Kling 2019-11-04 20:44:04 +01:00
parent 715d7a8532
commit 4623811ec3
Notes: sideshowbarker 2024-07-19 11:23:01 +09:00

View file

@ -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);