[vlc-commits] Fix + and - hotkeys

Rémi Denis-Courmont git at videolan.org
Thu Feb 10 21:49:32 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 10 22:44:51 2011 +0200| [1cba24efb1a1f01f5449e487d301180293b98a2e] | committer: Rémi Denis-Courmont

Fix + and - hotkeys

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1cba24efb1a1f01f5449e487d301180293b98a2e
---

 src/config/keys.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/config/keys.c b/src/config/keys.c
index a09eb39..9ebac34 100644
--- a/src/config/keys.c
+++ b/src/config/keys.c
@@ -145,7 +145,7 @@ uint_fast32_t ConfigStringToKey (const char *name)
     for (;;)
     {
         size_t len = strcspn (name, "-+");
-        if (name[len] == '\0')
+        if (len == 0 || name[len] == '\0')
             break;
 
         if (len == 4 && !strncasecmp (name, "Ctrl", 4))
@@ -166,7 +166,7 @@ uint_fast32_t ConfigStringToKey (const char *name)
         if (!strcasecmp( vlc_keys[i].psz_key_string, name))
             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)



More information about the vlc-commits mailing list