]> git.sesse.net Git - vlc/commitdiff
Don't display "Unknown command!" when the command is known.
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 3 Dec 2006 17:30:31 +0000 (17:30 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 3 Dec 2006 17:30:31 +0000 (17:30 +0000)
modules/control/rc.c

index f15f00a48e5e09c17414ef2f043d77083c110dc6..d5a345686d4ff62965c3e8b8ec6f3573d827adf3 100644 (file)
@@ -1477,6 +1477,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd,
             "logo-transparency\0";
         const char *psz_name;
 
+        if( newval.psz_string )
         for( psz_name = vars; *psz_name; psz_name += strlen( psz_name ) + 1 )
         {
             if( strcmp( psz_name, psz_cmd ) == 0 )
@@ -1485,15 +1486,15 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd,
 
                 if( i_type & VLC_VAR_INTEGER )
                 {
-                    if( !strlen( newval.psz_string ) ) break;
                     var_SetInteger( p_input->p_libvlc_global, psz_name,
                                     atoi( newval.psz_string ) );
+                    break;
                 }
                 else if( i_type & VLC_VAR_STRING )
                 {
-                    if( !strlen( newval.psz_string ) ) break;
                     var_SetInteger( p_input->p_libvlc_global, psz_name,
                                     newval.psz_string );
+                    break;
                 }
             }
         }