diff options
Diffstat (limited to 'src/keycode.cpp')
-rw-r--r-- | src/keycode.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/keycode.cpp b/src/keycode.cpp index 1ec325961..990dee339 100644 --- a/src/keycode.cpp +++ b/src/keycode.cpp @@ -256,7 +256,11 @@ KeyPress::KeyPress() : KeyPress::KeyPress(const char *name) { - if (strlen(name) > 4) { + if (name[0] == 0) { + Key = irr::KEY_KEY_CODES_COUNT; + Char = L'\0'; + return; + } else if (strlen(name) > 4) { try { Key = keyname_to_keycode(name); m_name = name; |