fixed commandline bug: handling '-' as option when '--' unused

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2651 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2001-11-03 19:04:58 +00:00
parent 529ad9ff87
commit 0386dee16e
1 changed files with 2 additions and 2 deletions

View File

@ -522,7 +522,7 @@ int parse_command_line(struct config *conf, int argc, char **argv, char **envp,
for (i = 1; i < argc; i++) {
next:
opt = argv[i];
/* check for -- (no more options id.) except --help ! */
/* check for -- (no more options id.) except --help! */
if ((*opt == '-') && (*(opt+1) == '-') && (*(opt+2) != 'h'))
{
no_more_opts = 1;
@ -535,7 +535,7 @@ next:
goto next;
}
if ((no_more_opts == 0) && (*opt == '-')) /* option */
if ((no_more_opts == 0) && (*opt == '-') && (*(opt+1) != 0)) /* option */
{
/* remove trailing '-' */
opt++;