Skip to content

Commit

Permalink
Fix argc being too big when invoking iSH from the command line
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Nov 18, 2019
1 parent dd8e656 commit dbc9072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xX_main_Xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dbc9072

Please sign in to comment.