diff --git a/AK/Format.cpp b/AK/Format.cpp index c4ebe8e59fe..ac73e68649c 100644 --- a/AK/Format.cpp +++ b/AK/Format.cpp @@ -610,7 +610,9 @@ void Formatter::format(FormatBuilder& builder, StringView value) void Formatter::vformat(FormatBuilder& builder, StringView fmtstr, TypeErasedFormatParams& params) { - return Formatter::format(builder, String::vformatted(fmtstr, params)); + StringBuilder string_builder; + AK::vformat(string_builder, fmtstr, params); + return Formatter::format(builder, string_builder.string_view()); } template diff --git a/AK/Format.h b/AK/Format.h index 953e062b8b1..c1c10d0b9f5 100644 --- a/AK/Format.h +++ b/AK/Format.h @@ -595,7 +595,7 @@ struct Formatter> : __FormatIfSupported> struct FormatString { }; template<> -struct Formatter : Formatter { +struct Formatter : Formatter { template void format(FormatBuilder& builder, StringView fmtstr, const Parameters&... parameters) {