summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c
index 8d408f9..0d633b0 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -2306,7 +2306,7 @@ command (int interactive, char *data)
result = cmdret_new ("not enough arguments.", RET_FAILURE);
goto free_lists;
}
- else if (list_size (&args) > uc->num_args)
+ else if (list_size (&head) > uc->num_args)
{
result = cmdret_new ("too many arguments.", RET_FAILURE);
goto free_lists;
@@ -4727,6 +4727,11 @@ cmd_set (int interactive, struct cmdarg **args)
result = cmdret_new ("not enough arguments.", RET_FAILURE);
goto failed;
}
+ else if (list_size (&head) > ARG(0,variable)->nargs)
+ {
+ result = cmdret_new ("too many arguments.", RET_FAILURE);
+ goto failed;
+ }
cmdargs = arg_array (&arglist);
result = ARG(0,variable)->set_fn (cmdargs);