I can't do math; fix bug introduced in 5a9761

This commit is contained in:
Austin Clements 2011-09-03 10:21:51 -04:00
parent 215a9ce237
commit 549c62cc1c

2
exec.c
View file

@ -61,7 +61,7 @@ exec(char *path, char **argv)
for(argc = 0; argv[argc]; argc++) {
if(argc >= MAXARG)
goto bad;
sp = (sp - strlen(argv[argc]) + 1) & ~3;
sp = (sp - (strlen(argv[argc]) + 1)) & ~3;
if(copyout(pgdir, sp, argv[argc], strlen(argv[argc]) + 1) < 0)
goto bad;
ustack[3+argc] = sp;