Permalink
Browse files

another fix for lua key events

  • Loading branch information...
jacob1 committed Jul 17, 2016
1 parent b8cdf4a commit 8a0496e60a6434566e2a0fd9b7e22642893e0ab3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/lua/LegacyLuaAPI.cpp
@@ -457,7 +457,7 @@ int luacon_keyevent(int key, Uint16 character, int modifier, int event)
for (int i = 1; i <= len && kycontinue; i++)
{
lua_rawgeti(l, -1, i);
if ((modifier & KEY_MOD_CONTROL) && (character < ' ' || character > '~'))
if ((modifier & KEY_MOD_CONTROL) && (character < ' ' || character > '~') && key < 256)
lua_pushlstring(l, (const char*)&key, 1);
else
lua_pushlstring(l, (const char*)&character, 1);

0 comments on commit 8a0496e

Please sign in to comment.