Commit 2a8c2b23 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Don't check return value of getopt_long against EOF, manpage says it returns -1 not EOF.

parent 93b1a2be
......@@ -1486,7 +1486,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
opterr = 0;
optind = 1;
while( ( i_cmd = getopt_long( *pi_argc, ppsz_argv, psz_shortopts,
p_longopts, &i_index ) ) != EOF )
p_longopts, &i_index ) ) != -1 )
{
/* A long option has been recognized */
if( i_cmd == 0 )
......@@ -1535,6 +1535,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
"You should use --%s instead.\n",
p_conf->psz_name, p_conf->psz_current);
}
//*psz_name = *(p_conf->psz_current);
psz_name = p_conf->psz_current;
p_conf = config_FindConfig( p_this, psz_name );
}
......
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