diff --git a/exec.c b/exec.c
index 629c433a21c09dc815bef438ab6719bf694a0c8a..312a5c3dd64924b9553245ede10e409ae5783fca 100644
--- a/exec.c
+++ b/exec.c
@@ -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;