diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-03 19:04:58 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-03 19:04:58 +0000 |
commit | 0386dee16eb6e3ea8144aab09b0582dad3a9ab58 (patch) | |
tree | 3b3a059925b671be75e5fca7c6839b35077d38c7 /cfgparser.c | |
parent | 529ad9ff8728e2cd7f0e6100b47a139e6aacbe13 (diff) | |
download | mpv-0386dee16eb6e3ea8144aab09b0582dad3a9ab58.tar.bz2 mpv-0386dee16eb6e3ea8144aab09b0582dad3a9ab58.tar.xz |
fixed commandline bug: handling '-' as option when '--' unused
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2651 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'cfgparser.c')
-rw-r--r-- | cfgparser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cfgparser.c b/cfgparser.c index e20c831492..8c9912b0cd 100644 --- a/cfgparser.c +++ b/cfgparser.c @@ -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++; |