1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 15:48:48 -05:00

Fix keycodes (#325)

This commit is contained in:
Ilya Zhuravlev 2012-12-23 02:11:32 +04:00
parent c4172934e5
commit 145e301269

View File

@ -260,7 +260,7 @@ KeyPress::KeyPress(const char *name)
try {
Key = keyname_to_keycode(name);
m_name = name;
if (strlen(name) > 8) {
if (strlen(name) > 8 && strncmp(name, "KEY_KEY_", 8) == 0) {
int chars_read = mbtowc(&Char, name + 8, 1);
assert (chars_read == 1 && "unexpected multibyte character");
} else