sh: Don't do anything if Enter is pressed with no command
This commit is contained in:
parent
b6fb5f3dfe
commit
e2eb9a92cb
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user