From b47b3ce1bd651c689fae3cac2760f43f453e2b6e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 10 Aug 2011 00:51:29 +0200 Subject: randomconfig fixes Signed-off-by: Denys Vlasenko --- libbb/getopt32.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libbb/getopt32.c') diff --git a/libbb/getopt32.c b/libbb/getopt32.c index c7c4079c2..d0e83d88e 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c @@ -467,13 +467,17 @@ getopt32(char **argv, const char *applet_opts, ...) } for (on_off = complementary; on_off->opt_char; on_off++) if (on_off->opt_char == *s) - break; + goto found_opt; + /* Without this, diagnostic of such bugs is not easy */ + bb_error_msg_and_die("NO OPT %c!", *s); + found_opt: if (c == ':' && s[2] == ':') { on_off->param_type = PARAM_LIST; continue; } if (c == '+' && (s[2] == ':' || s[2] == '\0')) { on_off->param_type = PARAM_INT; + s++; continue; } if (c == ':' || c == '\0') { -- cgit v1.2.3