From: Ilya Zhuravlev Date: Sat, 22 Dec 2012 22:11:32 +0000 (+0400) Subject: Fix keycodes (#325) X-Git-Tag: 0.4.5~133 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=145e30126968f26fded87b28747784007a257111;p=oweals%2Fminetest.git Fix keycodes (#325) --- diff --git a/src/keycode.cpp b/src/keycode.cpp index cdf3c6062..9aa9d300d 100644 --- a/src/keycode.cpp +++ b/src/keycode.cpp @@ -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