From 57be4ef498fcc904c19d13ce92e9deced986dce5 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Tue, 26 Apr 2016 22:42:57 -0400 Subject: [PATCH] 'character' is always 0 in sdl keyup event, so just send 'key' instead to lua keyup events --- src/lua/LuaScriptInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/LuaScriptInterface.cpp b/src/lua/LuaScriptInterface.cpp index 1b83cc636..77f4139e0 100644 --- a/src/lua/LuaScriptInterface.cpp +++ b/src/lua/LuaScriptInterface.cpp @@ -3333,7 +3333,7 @@ bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, boo modifiers |= 0x040; if(alt) modifiers |= 0x100; - return luacon_keyevent(key, character, modifiers, LUACON_KUP); + return luacon_keyevent(key, key < 256 ? key : 0, modifiers, LUACON_KUP); } bool LuaScriptInterface::OnMouseTick()