sh: Don't do anything if Enter is pressed with no command

This commit is contained in:
apio 2023-03-24 00:51:42 +01:00
parent b6fb5f3dfe
commit e2eb9a92cb
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -90,6 +90,7 @@ int main()
if (child == 0) if (child == 0)
{ {
char** argv = split_command_into_argv(command); char** argv = split_command_into_argv(command);
if (argv[0] == NULL) return 0;
sh_execvp(argv); sh_execvp(argv);
perror(argv[0]); perror(argv[0]);
return 1; return 1;