about summary refs log tree commit diff
path: root/src/process/execle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process/execle.c')
-rw-r--r--src/process/execle.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/process/execle.c b/src/process/execle.c
index 64908366..6f2ec055 100644
--- a/src/process/execle.c
+++ b/src/process/execle.c
@@ -14,9 +14,8 @@ int execle(const char *path, const char *argv0, ...)
 		char **envp;
 		va_start(ap, argv0);
 		argv[0] = (char *)argv0;
-		for (i=1; i<argc; i++)
+		for (i=1; i<=argc; i++)
 			argv[i] = va_arg(ap, char *);
-		argv[i] = NULL;
 		envp = va_arg(ap, char **);
 		return execve(path, argv, envp);
 	}