summaryrefslogtreecommitdiff
path: root/libstd/sys-osx.myr
diff options
context:
space:
mode:
Diffstat (limited to 'libstd/sys-osx.myr')
-rw-r--r--libstd/sys-osx.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstd/sys-osx.myr b/libstd/sys-osx.myr
index e34103f..1b73a5a 100644
--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -655,7 +655,7 @@ const execv = {cmd, args
/* doesn't just call execve() for efficiency's sake. */
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])
;;
@@ -669,7 +669,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])
;;