diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:48:57 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:48:57 +0000 |
commit | 9db164d6e39050d09f38288c6045cd2a2cbf6d63 (patch) | |
tree | ea5dc2d28d15da0de25c197ed7d059c3656af1a0 /libbb/getopt32.c | |
parent | 1118c95535ea51961437089fc3dece5ab4ea7e1b (diff) | |
parent | d84b175cb6948eb17f847313bf912174e2f934e1 (diff) | |
download | busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.gz busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.bz2 busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.zip |
Merge commit 'd84b175cb6948eb17f847313bf912174e2f934e1' into merge
Conflicts:
include/platform.h
Diffstat (limited to 'libbb/getopt32.c')
-rw-r--r-- | libbb/getopt32.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 02cbefec9..ae019b26b 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -467,13 +467,17 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
467 | } | 467 | } |
468 | for (on_off = complementary; on_off->opt_char; on_off++) | 468 | for (on_off = complementary; on_off->opt_char; on_off++) |
469 | if (on_off->opt_char == *s) | 469 | if (on_off->opt_char == *s) |
470 | break; | 470 | goto found_opt; |
471 | /* Without this, diagnostic of such bugs is not easy */ | ||
472 | bb_error_msg_and_die("NO OPT %c!", *s); | ||
473 | found_opt: | ||
471 | if (c == ':' && s[2] == ':') { | 474 | if (c == ':' && s[2] == ':') { |
472 | on_off->param_type = PARAM_LIST; | 475 | on_off->param_type = PARAM_LIST; |
473 | continue; | 476 | continue; |
474 | } | 477 | } |
475 | if (c == '+' && (s[2] == ':' || s[2] == '\0')) { | 478 | if (c == '+' && (s[2] == ':' || s[2] == '\0')) { |
476 | on_off->param_type = PARAM_INT; | 479 | on_off->param_type = PARAM_INT; |
480 | s++; | ||
477 | continue; | 481 | continue; |
478 | } | 482 | } |
479 | if (c == ':' || c == '\0') { | 483 | if (c == ':' || c == '\0') { |