diff options
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r-- | usr.bin/tmux/cmd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index 92d14f458e3..343375c5f48 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.165 2021/08/20 19:34:51 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.166 2021/08/20 19:50:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -518,13 +518,10 @@ cmd_parse(int argc, char **argv, const char *file, u_int line, char **cause) return (NULL); cmd_log_argv(argc, argv, "%s: %s", __func__, entry->name); - args = args_parse(entry->args.template, argc, argv); + args = args_parse(entry->args.template, argc, argv, entry->args.lower, + entry->args.upper); if (args == NULL) goto usage; - if (entry->args.lower != -1 && args->argc < entry->args.lower) - goto usage; - if (entry->args.upper != -1 && args->argc > entry->args.upper) - goto usage; cmd = xcalloc(1, sizeof *cmd); cmd->entry = entry; |