summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream.c b/stream.c
index 72b819ff..7175d59a 100644
--- a/stream.c
+++ b/stream.c
@@ -1551,9 +1551,9 @@ val open_pipevp(val name, val mode_str, val args)
name, num(errno), string_utf8(strerror(errno)), nao);
}
- argv = (char **) chk_malloc((nargs + 1) * sizeof *argv);
+ argv = (char **) chk_malloc((nargs + 2) * sizeof *argv);
- for (i = 0, iter = args; iter; i++, iter = cdr(iter)) {
+ for (i = 0, iter = cons(name, args); iter; i++, iter = cdr(iter)) {
val arg = car(iter);
argv[i] = utf8_dup_to(c_str(arg));
}