summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/zutil.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c
index 376cd8402..d98028a84 100644
--- a/Src/Modules/zutil.c
+++ b/Src/Modules/zutil.c
@@ -1833,7 +1833,8 @@ bin_zparseopts(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
 		    if (o[1]) {
 			add_opt_val(d, o + 1);
 			break;
-		    } else if (!(d->flags & ZOF_OPT)) {
+		    } else if (!(d->flags & ZOF_OPT) ||
+			       (pp[1] && pp[1][0] != '-')) {
 			if (!pp[1]) {
 			    zwarnnam(nam, "missing argument for option: %s",
 				    d->name);
@@ -1859,7 +1860,8 @@ bin_zparseopts(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
 
 		if (*e)
 		    add_opt_val(d, e);
-		else if (!(d->flags & ZOF_OPT)) {
+		else if (!(d->flags & ZOF_OPT) ||
+			 (pp[1] && pp[1][0] != '-')) {
 		    if (!pp[1]) {
 			zwarnnam(nam, "missing argument for option: %s",
 				d->name);