summaryrefslogtreecommitdiff
path: root/libstd/sys-linux.myr
diff options
context:
space:
mode:
Diffstat (limited to 'libstd/sys-linux.myr')
-rw-r--r--libstd/sys-linux.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstd/sys-linux.myr b/libstd/sys-linux.myr
index 0079108..8b787f7 100644
--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -628,7 +628,7 @@ const execv = {cmd, args
/* of course we fucking have to duplicate this code everywhere,
* since we want to stack allocate... */
p = alloca((args.len + 1)*sizeof(byte#))
- cargs = (p castto(byte##))[:args.len]
+ cargs = (p castto(byte##))[:args.len + 1]
for i = 0; i < args.len; i++
cargs[i] = cstring(args[i])
;;
@@ -642,7 +642,7 @@ const execve = {cmd, args, env
/* copy the args */
p = alloca((args.len + 1)*sizeof(byte#))
- cargs = (p castto(byte##))[:args.len]
+ cargs = (p castto(byte##))[:args.len + 1]
for i = 0; i < args.len; i++
cargs[i] = cstring(args[i])
;;