oops - broke arg counting
This commit is contained in:
parent
de1329dda2
commit
71d5bf4d08
1 changed files with 1 additions and 1 deletions
2
exec.c
2
exec.c
|
@ -42,7 +42,7 @@ exec(char *path, char **argv)
|
||||||
// Arguments.
|
// Arguments.
|
||||||
arglen = 0;
|
arglen = 0;
|
||||||
for(argc=0; argv[argc]; argc++)
|
for(argc=0; argv[argc]; argc++)
|
||||||
arglen += strlen(argv[i]) + 1;
|
arglen += strlen(argv[argc]) + 1;
|
||||||
arglen = (arglen+3) & ~3;
|
arglen = (arglen+3) & ~3;
|
||||||
sz += arglen + 4*(argc+1);
|
sz += arglen + 4*(argc+1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue