From: Ilya Zhuravlev Date: Sat, 22 Dec 2012 22:11:32 +0000 (+0400) Subject: Fix keycodes (#325) X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=145e30126968f26fded87b28747784007a257111;p=zefram%2Fminetest%2Fminetest_engine.git Fix keycodes (#325) --- diff --git a/src/keycode.cpp b/src/keycode.cpp index cdf3c606..9aa9d300 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