Commit 1cba24ef authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix + and - hotkeys

parent e3147fe7
...@@ -145,7 +145,7 @@ uint_fast32_t ConfigStringToKey (const char *name) ...@@ -145,7 +145,7 @@ uint_fast32_t ConfigStringToKey (const char *name)
for (;;) for (;;)
{ {
size_t len = strcspn (name, "-+"); size_t len = strcspn (name, "-+");
if (name[len] == '\0') if (len == 0 || name[len] == '\0')
break; break;
if (len == 4 && !strncasecmp (name, "Ctrl", 4)) if (len == 4 && !strncasecmp (name, "Ctrl", 4))
...@@ -166,7 +166,7 @@ uint_fast32_t ConfigStringToKey (const char *name) ...@@ -166,7 +166,7 @@ uint_fast32_t ConfigStringToKey (const char *name)
if (!strcasecmp( vlc_keys[i].psz_key_string, name)) if (!strcasecmp( vlc_keys[i].psz_key_string, name))
return vlc_keys[i].i_key_code | mods; return vlc_keys[i].i_key_code | mods;
return (vlc_towc (name, &cp) > 0) ? (mods | cp) : 0; return (vlc_towc (name, &cp) > 0) ? (mods | cp) : KEY_UNSET;
} }
char *vlc_keycode2str (uint_fast32_t code) char *vlc_keycode2str (uint_fast32_t code)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment