diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-06-19 18:21:18 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-06-20 10:13:58 +0300 |
commit | c346c020bf93d455dab917dd27d86afc78273dd2 (patch) | |
tree | d041867620d3f08299ca3707f05dcc084e39202f /include/sway/commands.h | |
parent | 5069b53d6c561d0f949cb0aec1d70397a2fb8a90 (diff) |
config: fix find_handler logic
Without this change, the handlers listed in the config_handlers or
command_handlers arrays (depending on reading or active) in commands.c
would be valid subcommands. To make matters worse, they would also take
precedence over the defined subcommand handlers.
This corrects find_handler to only work on the handler array given
instead of implicitly trying others.
Diffstat (limited to 'include/sway/commands.h')
-rw-r--r-- | include/sway/commands.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index e0cd94d1..641f2504 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h @@ -47,7 +47,8 @@ struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val); struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers, - int handlers_size); + size_t handlers_size); + /** * Parse and executes a command. * |