oops - broke arg counting

This commit is contained in:
rsc 2007-08-30 18:19:52 +00:00
parent de1329dda2
commit 71d5bf4d08

2
exec.c
View file

@ -42,7 +42,7 @@ exec(char *path, char **argv)
// Arguments.
arglen = 0;
for(argc=0; argv[argc]; argc++)
arglen += strlen(argv[i]) + 1;
arglen += strlen(argv[argc]) + 1;
arglen = (arglen+3) & ~3;
sz += arglen + 4*(argc+1);