diff options
author | midipix <writeonce@midipix.org> | 2016-03-08 09:00:40 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-03-08 09:06:46 -0500 |
commit | 13f7119055c48e7062d6de0a07d243b2a97ea28b (patch) | |
tree | 3f3799a4f04a0d0a16ccf5ab6dc5ef8e0e591aae /src/internal/argv | |
parent | b9cf251ce618f4c1e41cd7e188da97e4ce004292 (diff) | |
download | sofort-13f7119055c48e7062d6de0a07d243b2a97ea28b.tar.bz2 sofort-13f7119055c48e7062d6de0a07d243b2a97ea28b.tar.xz |
argv.h: test for ARGV_OPTION_HYBRID_ONLY before accepting arg-less options.
Diffstat (limited to 'src/internal/argv')
-rw-r--r-- | src/internal/argv/argv.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h index dbf05d6..7568436 100644 --- a/src/internal/argv/argv.h +++ b/src/internal/argv/argv.h @@ -381,15 +381,15 @@ static void argv_scan( if (fhybrid && !(option->flags & ARGV_OPTION_HYBRID_SWITCH)) ferr = ARGV_ERROR_HYBRID_NONE; + else if (!fhybrid && (option->flags & ARGV_OPTION_HYBRID_ONLY)) + ferr = ARGV_ERROR_HYBRID_ONLY; else if (option->optarg == ARGV_OPTARG_NONE) { if (val[0]) { ferr = ARGV_ERROR_OPTARG_NONE; ctx->errch = val + 1; } else fval = false; - } else if (!fhybrid && (option->flags & ARGV_OPTION_HYBRID_ONLY)) - ferr = ARGV_ERROR_HYBRID_ONLY; - else if (val[0] && (option->flags & ARGV_OPTION_HYBRID_JOINED)) { + } else if (val[0] && (option->flags & ARGV_OPTION_HYBRID_JOINED)) { fval = true; ch = val; } else if (fhybrid && !val[0] && !(option->flags & ARGV_OPTION_HYBRID_SPACE)) |