From ea9520863db59b9e7effca1f7ccbee25657e21e2 Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Tue, 11 Aug 2015 19:30:20 -0400 Subject: [PATCH] Try to correct string encoding issue in scripting. Fixes #2278 --- src/scriptengine/script_gui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/scriptengine/script_gui.cpp b/src/scriptengine/script_gui.cpp index af3fb494a..a7cda59e3 100644 --- a/src/scriptengine/script_gui.cpp +++ b/src/scriptengine/script_gui.cpp @@ -53,10 +53,9 @@ namespace Scripting { InputDevice* device = input_manager->getDeviceManager()->getLatestUsedDevice(); DeviceConfig* config = device->getConfiguration(); - irr::core::stringw control; PlayerAction ScriptAction = (PlayerAction)Enum_value; - control = config->getBindingAsString(ScriptAction); - std::string key = std::string(irr::core::stringc(control).c_str()); + irr::core::stringw control = config->getBindingAsString(ScriptAction); + std::string key = StringUtils::wide_to_utf8(control.c_str()); return key; }