mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 00:07:33 +00:00
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:
parent
529ad9ff87
commit
0386dee16e
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user