From 0386dee16eb6e3ea8144aab09b0582dad3a9ab58 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 3 Nov 2001 19:04:58 +0000 Subject: fixed commandline bug: handling '-' as option when '--' unused git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2651 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfgparser.c | 4 ++-- 1 file 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++; -- cgit v1.2.3