diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp index f92d4dad78..dd21a85305 100644 --- a/apps/openmw/mwmechanics/npcstats.cpp +++ b/apps/openmw/mwmechanics/npcstats.cpp @@ -261,8 +261,8 @@ void MWMechanics::NpcStats::increaseSkill( MWBase::Environment::get().getWindowManager()->playSound(ESM::RefId::stringRefId("skillraise")); std::string message{ MWBase::Environment::get().getWindowManager()->getGameSettingString("sNotifyMessage39", {}) }; - message - = Misc::StringUtils::format(message, MyGUI::TextIterator::toTagsString(skill->mName), static_cast(base)); + message = Misc::StringUtils::format( + message, MyGUI::TextIterator::toTagsString(skill->mName).asUTF8(), static_cast(base)); if (readBook) message = "#{sBookSkillMessage}\n" + message; diff --git a/components/misc/strings/format.hpp b/components/misc/strings/format.hpp index b542b7291f..21ddf26622 100644 --- a/components/misc/strings/format.hpp +++ b/components/misc/strings/format.hpp @@ -1,6 +1,7 @@ #ifndef COMPONENTS_MISC_STRINGS_FORMAT_H #define COMPONENTS_MISC_STRINGS_FORMAT_H +#include #include #include #include @@ -19,6 +20,7 @@ namespace Misc::StringUtils T argument(T value) noexcept { static_assert(!std::is_same_v, "std::string_view is not supported"); + static_assert(!std::is_same_v, "MyGUI::UString is not supported"); return value; }