summaryrefslogtreecommitdiffstats
path: root/input/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'input/cmd.c')
-rw-r--r--input/cmd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/input/cmd.c b/input/cmd.c
index c637ec22bd..7e50f0784b 100644
--- a/input/cmd.c
+++ b/input/cmd.c
@@ -239,6 +239,13 @@ static bool cmd_node_map(struct mp_log *log, struct mp_cmd *cmd, mpv_node *node)
if (!find_cmd(log, cmd, bstr0(name->u.string)))
return false;
+ if (cmd->def->vararg) {
+ mp_err(log, "Command %s: this command uses a variable number of "
+ "arguments, which does not work with named arguments.\n",
+ cmd->name);
+ return false;
+ }
+
for (int n = 0; n < args->num; n++) {
const char *key = args->keys[n];
mpv_node *val = &args->values[n];