Whitelist and type validation for fallbacks

This commit is contained in:
Petr Mikheev 2023-04-27 11:01:21 +02:00
parent e35bf97603
commit be45b8199e
5 changed files with 291 additions and 17 deletions

View file

@ -141,7 +141,8 @@ namespace MWGui
mLevelText->setCaptionWithReplacing("#{sLevelUpMenu1} " + MyGUI::utility::toString(level));
std::string_view levelupdescription;
levelupdescription = Fallback::Map::getString("Level_Up_Level" + MyGUI::utility::toString(level));
if (level <= 20)
levelupdescription = Fallback::Map::getString("Level_Up_Level" + MyGUI::utility::toString(level));
if (levelupdescription.empty())
levelupdescription = Fallback::Map::getString("Level_Up_Default");