diff --git a/Kernel/KString.h b/Kernel/KString.h index cb7a79b06a4..cb0ce3b8540 100644 --- a/Kernel/KString.h +++ b/Kernel/KString.h @@ -48,7 +48,18 @@ template<> struct Formatter : Formatter { void format(FormatBuilder& builder, Kernel::KString const& value) { - Formatter::format(builder, value.characters()); + Formatter::format(builder, value.view()); + } +}; + +template<> +struct Formatter> : Formatter { + void format(FormatBuilder& builder, OwnPtr const& value) + { + if (value) + Formatter::format(builder, value->view()); + else + Formatter::format(builder, "[out of memory]"sv); } };