aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Zhuravlev <zhuravlevilya@ya.ru>2012-12-23 02:11:32 +0400
committerIlya Zhuravlev <zhuravlevilya@ya.ru>2012-12-23 02:11:32 +0400
commit145e30126968f26fded87b28747784007a257111 (patch)
tree0b99dc10fe510463e65f6ed6edd00d479fa95b57
parentc4172934e5f5e1c8aca4355993357e2d9a73b1e7 (diff)
downloadminetest-145e30126968f26fded87b28747784007a257111.tar.gz
minetest-145e30126968f26fded87b28747784007a257111.tar.bz2
minetest-145e30126968f26fded87b28747784007a257111.zip
Fix keycodes (#325)
-rw-r--r--src/keycode.cpp2
1 files changed, 1 insertions, 1 deletions
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