diff --git a/xX_main_Xx.h b/xX_main_Xx.h index 94fa554a56..aeccbf4287 100644 --- a/xX_main_Xx.h +++ b/xX_main_Xx.h @@ -90,7 +90,7 @@ static inline int xX_main_Xx(int argc, char *const argv[], const char *envp) { i++; } argv_copy[p] = '\0'; - err = do_execve(argv[optind], argc, argv_copy, envp == NULL ? "\0" : envp); + err = do_execve(argv[optind], argc - optind, argv_copy, envp == NULL ? "\0" : envp); if (err < 0) return err; tty_drivers[TTY_CONSOLE_MAJOR] = &real_tty_driver;