diff --git a/AK/Format.h b/AK/Format.h index f1ef2e8fb8..96106f5fbd 100644 --- a/AK/Format.h +++ b/AK/Format.h @@ -314,6 +314,18 @@ struct Formatter : Formatter { template struct Formatter : Formatter { }; +template +struct Formatter : Formatter { + void format(FormatBuilder& builder, const unsigned char* value) + { + if (m_mode == Mode::Pointer) { + Formatter formatter { *this }; + formatter.format(builder, reinterpret_cast(value)); + } else { + Formatter::format(builder, { value, Size }); + } + } +}; template<> struct Formatter : Formatter { };