summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/arguments.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-09-09 21:55:04 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-09-09 21:55:04 +0000
commit9a21999c134641c573c732d665188fa30fcdcd5d (patch)
tree29a777d58236d15490481f2de13135fdda18ace0 /usr.bin/tmux/arguments.c
parent3704019ae4ba19790d5da0b418f21cceddbb33b6 (diff)
Keep -? as usage.
Diffstat (limited to 'usr.bin/tmux/arguments.c')
-rw-r--r--usr.bin/tmux/arguments.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c
index 1b5ec3dee10..03a5b824a13 100644
--- a/usr.bin/tmux/arguments.c
+++ b/usr.bin/tmux/arguments.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arguments.c,v 1.50 2021/09/09 13:38:32 nicm Exp $ */
+/* $OpenBSD: arguments.c,v 1.51 2021/09/09 21:55:03 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -153,6 +153,10 @@ args_parse(const struct args_parse *parse, struct args_value *values,
flag = *string++;
if (flag == '\0')
break;
+ if (flag == '?') {
+ args_free(args);
+ return (NULL);
+ }
if (!isalnum(flag)) {
xasprintf(cause, "invalid flag -%c", flag);
args_free(args);