summaryrefslogtreecommitdiffhomepage
path: root/src/internal/argv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-27 21:22:54 +0000
committermidipix <writeonce@midipix.org>2024-01-27 21:22:54 +0000
commite70e361b54296c1cdc7d23ca1bd74ef740c97b7a (patch)
treea709277c81f649a0794cf26cc1816743f87f833e /src/internal/argv
parent11362f17e461e59bff39f91bc1970031167d44d3 (diff)
downloadslibtool-e70e361b54296c1cdc7d23ca1bd74ef740c97b7a.tar.bz2
slibtool-e70e361b54296c1cdc7d23ca1bd74ef740c97b7a.tar.xz
argv.h: argv_scan(): properly handle (fhybrid && ARGV_OPTARG_OPTIONAL).
Diffstat (limited to 'src/internal/argv')
-rw-r--r--src/internal/argv/argv.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/internal/argv/argv.h b/src/internal/argv/argv.h
index a0bc625..d17865b 100644
--- a/src/internal/argv/argv.h
+++ b/src/internal/argv/argv.h
@@ -438,7 +438,12 @@ static void argv_scan(
ch = val;
} else if (fhybrid && !val[0] && !(option->flags & ARGV_OPTION_HYBRID_SPACE)) {
- ferr = ARGV_ERROR_HYBRID_SPACE;
+ if (option->optarg == ARGV_OPTARG_OPTIONAL) {
+ fval = false;
+
+ } else {
+ ferr = ARGV_ERROR_HYBRID_SPACE;
+ }
} else if (fhybrid && (val[0]=='=') && !(option->flags & ARGV_OPTION_HYBRID_EQUAL)) {
ferr = ARGV_ERROR_HYBRID_EQUAL;