Revision c3c78324

View differences:

cmdutils.c
130 130
                handleoptions = 0;
131 131
                continue;
132 132
            }
133
            po= find_option(options, opt + 1);
134
            if (!po->name && opt[1] == 'n' && opt[2] == 'o') {
133
            opt++;
134
            po= find_option(options, opt);
135
            if (!po->name && opt[0] == 'n' && opt[1] == 'o') {
135 136
                /* handle 'no' bool option */
136
                po = find_option(options, opt + 3);
137
                po = find_option(options, opt + 2);
137 138
                if (!(po->name && (po->flags & OPT_BOOL)))
138 139
                    goto unknown_opt;
139 140
                bool_val = 0;
......
160 161
            } else if (po->flags & OPT_BOOL) {
161 162
                *po->u.int_arg = bool_val;
162 163
            } else if (po->flags & OPT_INT) {
163
                *po->u.int_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT_MIN, INT_MAX);
164
                *po->u.int_arg = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
164 165
            } else if (po->flags & OPT_INT64) {
165
                *po->u.int64_arg = parse_number_or_die(opt+1, arg, OPT_INT64, INT64_MIN, INT64_MAX);
166
                *po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
166 167
            } else if (po->flags & OPT_FLOAT) {
167
                *po->u.float_arg = parse_number_or_die(opt+1, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
168
                *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
168 169
            } else if (po->flags & OPT_FUNC2) {
169
                if(po->u.func2_arg(opt+1, arg)<0)
170
                if(po->u.func2_arg(opt, arg)<0)
170 171
                    goto unknown_opt;
171 172
            } else {
172 173
                po->u.func_arg(arg);

Also available in: Unified diff