aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-12-19 10:13:10 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-12-19 10:13:10 +0000
commit850b05fbde26981347dbc522592d33530e9009bd (patch)
tree0fa1bae60686d1ad8522e003442385f8ccaf8483
parentf796700cf010d7ff2615c59bc364bbbef14153a4 (diff)
downloadbusybox-850b05fbde26981347dbc522592d33530e9009bd.tar.gz
Fix a bug preventing use of escaped characters that use the signed bit
-rw-r--r--libbb/getopt_ulflags.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libbb/getopt_ulflags.c b/libbb/getopt_ulflags.c
index 04d1e669f..371fdab26 100644
--- a/libbb/getopt_ulflags.c
+++ b/libbb/getopt_ulflags.c
@@ -60,7 +60,7 @@ const char *bb_opt_complementaly;
typedef struct
{
- char opt;
+ unsigned char opt;
char list_flg;
unsigned long switch_on;
unsigned long switch_off;
@@ -159,10 +159,9 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
while ((c = getopt_long (argc, argv, applet_opts,
bb_applet_long_options, NULL)) > 0) {
-
for (on_off = complementaly; on_off->opt != c; on_off++) {
if(!on_off->opt)
- bb_show_usage ();
+ bb_show_usage ();
}
if(flags & on_off->incongruously)
flags |= 0x80000000UL;