diff options
Diffstat (limited to 'src/option.cc')
-rw-r--r-- | src/option.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/option.cc b/src/option.cc index 7f8bdeb4..366c9c54 100644 --- a/src/option.cc +++ b/src/option.cc @@ -47,15 +47,15 @@ namespace { else *p++ = ch; } + *p++ = '_'; *p = '\0'; if (expr_t::ptr_op_t op = scope.lookup(buf)) - return op_bool_tuple(op, false); + return op_bool_tuple(op, true); - *p++ = '_'; - *p = '\0'; + *--p = '\0'; - return op_bool_tuple(scope.lookup(buf), true); + return op_bool_tuple(scope.lookup(buf), false); } op_bool_tuple find_option(scope_t& scope, const char letter) @@ -63,15 +63,15 @@ namespace { char buf[10]; std::strcpy(buf, "opt_"); buf[4] = letter; - buf[5] = '\0'; + buf[5] = '_'; + buf[6] = '\0'; if (expr_t::ptr_op_t op = scope.lookup(buf)) - return op_bool_tuple(op, false); + return op_bool_tuple(op, true); - buf[5] = '_'; - buf[6] = '\0'; + buf[5] = '\0'; - return op_bool_tuple(scope.lookup(buf), true); + return op_bool_tuple(scope.lookup(buf), false); } void process_option(const function_t& opt, scope_t& scope, |