aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Härer <markus.haerer@gmx.net>2024-07-28 20:53:42 +0200
committerMarkus Härer <markus.haerer@gmx.net>2024-08-04 15:58:02 +0200
commit98a397c3794f842555b50ebe4c0b4eca3530500f (patch)
tree8cd4a781c3629477aefcad5f683e2717d4da3e62
parent8adee68acddd62d915a3ab7b0279a71c8ddb6da0 (diff)
KeyboardTranslator: Fix call to `StringUtils::ToLower`
567960ee8e2e changed `strMod` from `std::string` to `const char*` resulting in the call to `StringUtils::ToLower` to not modify `strMod` inplace anymore. (cherry picked from commit 1a1503cc838b40c651f008eedf43cdc2f55be35a)
-rw-r--r--xbmc/input/keymaps/keyboard/KeyboardTranslator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xbmc/input/keymaps/keyboard/KeyboardTranslator.cpp b/xbmc/input/keymaps/keyboard/KeyboardTranslator.cpp
index 2767022ba8..637e551ab3 100644
--- a/xbmc/input/keymaps/keyboard/KeyboardTranslator.cpp
+++ b/xbmc/input/keymaps/keyboard/KeyboardTranslator.cpp
@@ -51,10 +51,10 @@ uint32_t CKeyboardTranslator::TranslateButton(const tinyxml2::XMLElement* pButto
button_id = TranslateString(szButton);
// Process the ctrl/shift/alt modifiers
- const char* strMod;
- if (pButton->QueryStringAttribute("mod", &strMod) == tinyxml2::XML_SUCCESS)
+ const char* cstrMod;
+ if (pButton->QueryStringAttribute("mod", &cstrMod) == tinyxml2::XML_SUCCESS)
{
- StringUtils::ToLower(strMod);
+ const std::string strMod = StringUtils::ToLower(cstrMod);
std::vector<std::string> modArray = StringUtils::Split(strMod, ",");
for (auto substr : modArray)