summaryrefslogtreecommitdiffstats
path: root/cmd-parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-parse.y')
-rw-r--r--cmd-parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-parse.y b/cmd-parse.y
index 57d0e84e..86917941 100644
--- a/cmd-parse.y
+++ b/cmd-parse.y
@@ -804,7 +804,8 @@ cmd_parse_build_command(struct cmd_parse_command *cmd,
return (cmdlist);
TAILQ_FOREACH(arg, &cmd->arguments, entry) {
- values = xreallocarray(values, count + 1, sizeof *values);
+ values = xrecallocarray(values, count, count + 1,
+ sizeof *values);
switch (arg->type) {
case CMD_PARSE_STRING:
values[count].type = ARGS_STRING;