mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix keycodes (#325)
This commit is contained in:
parent
c4172934e5
commit
145e301269
@ -260,7 +260,7 @@ KeyPress::KeyPress(const char *name)
|
|||||||
try {
|
try {
|
||||||
Key = keyname_to_keycode(name);
|
Key = keyname_to_keycode(name);
|
||||||
m_name = 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);
|
int chars_read = mbtowc(&Char, name + 8, 1);
|
||||||
assert (chars_read == 1 && "unexpected multibyte character");
|
assert (chars_read == 1 && "unexpected multibyte character");
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user