diff options
Diffstat (limited to 'src/helper/command.c')
-rw-r--r-- | src/helper/command.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index fdb59f01..96d23ab4 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -447,9 +447,12 @@ static int run_command(struct command_context *context, return ERROR_FAIL; } - unsigned argc = num_words - start_word - 1; - const char **args = words + start_word + 1; - int retval = c->handler(context, args, argc); + struct command_invocation cmd = { + .ctx = context, + .argc = num_words - start_word - 1, + .argv = words + start_word + 1, + }; + int retval = c->handler(&cmd); if (retval == ERROR_COMMAND_SYNTAX_ERROR) { /* Print help for command */ |