diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/getopt_ulflags.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libbb/getopt_ulflags.c b/libbb/getopt_ulflags.c index 9bf8c0559..04d1e669f 100644 --- a/libbb/getopt_ulflags.c +++ b/libbb/getopt_ulflags.c | |||
@@ -90,7 +90,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...) | |||
90 | 90 | ||
91 | va_start (p, applet_opts); | 91 | va_start (p, applet_opts); |
92 | 92 | ||
93 | for (s = applet_opts; *s; s++) { | 93 | /* skip GNU extension */ |
94 | s = applet_opts; | ||
95 | if(*s == '+' || *s == '-') | ||
96 | s++; | ||
97 | |||
98 | for (; *s; s++) { | ||
94 | c++; | 99 | c++; |
95 | while (s[1] == ':') { | 100 | while (s[1] == ':') { |
96 | /* check GNU extension "o::" - optional arg */ | 101 | /* check GNU extension "o::" - optional arg */ |
@@ -99,7 +104,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...) | |||
99 | } | 104 | } |
100 | complementaly = xcalloc (c + 1, sizeof (t_complementaly)); | 105 | complementaly = xcalloc (c + 1, sizeof (t_complementaly)); |
101 | c = 0; | 106 | c = 0; |
102 | for (s = applet_opts; *s; s++) { | 107 | /* skip GNU extension */ |
108 | s = applet_opts; | ||
109 | if(*s == '+' || *s == '-') | ||
110 | s++; | ||
111 | |||
112 | for (; *s; s++) { | ||
103 | complementaly->opt = *s; | 113 | complementaly->opt = *s; |
104 | complementaly->switch_on |= (1 << c); | 114 | complementaly->switch_on |= (1 << c); |
105 | c++; | 115 | c++; |