From cc592ab81467409a42584b05d1d06fb4136ff78c Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 12 Jan 2022 23:25:36 -0800 Subject: [PATCH] Use fmt::runtime in FmtFormatT This format string is by definition dynamic and can't be checked at compile time. There are other similar strings in the log handler and in asserts, but they use vformat and thus don't need fmt::runtime. We might be able to do a similar thing where the untranslated string is compile-time checked, but FmtFormatT is used in so few places that I don't want to handle that in this PR. --- Source/Core/Common/MsgHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/MsgHandler.h b/Source/Core/Common/MsgHandler.h index 84afaafbe9..0e2de793a1 100644 --- a/Source/Core/Common/MsgHandler.h +++ b/Source/Core/Common/MsgHandler.h @@ -73,7 +73,7 @@ void SetAbortOnPanicAlert(bool should_abort); template std::string FmtFormatT(const char* string, Args&&... args) { - return fmt::format(Common::GetStringT(string), std::forward(args)...); + return fmt::format(fmt::runtime(Common::GetStringT(string)), std::forward(args)...); } } // namespace Common