Code

Dont lookup key if key==0 in find_key_command()
authorKalle Wallin <kaw@linux.se>
Wed, 21 Jul 2004 09:59:31 +0000 (09:59 +0000)
committerKalle Wallin <kaw@linux.se>
Wed, 21 Jul 2004 09:59:31 +0000 (09:59 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1889 09075e82-0dd4-0310-85a5-a0d7c8717e4f

src/command.c

index d38402b2cdac5bb84056cc09a79902ec152aeef2..aecf31ab716a72140ec000dd8fd22efae5a38dec 100644 (file)
@@ -362,7 +362,7 @@ find_key_command(int key, command_definition_t *cmds)
   int i;
 
   i=0;
-  while( cmds && cmds[i].name )
+  while( key && cmds && cmds[i].name )
     {
       if( cmds[i].keys[0] == key || 
          cmds[i].keys[1] == key ||