sh: Clear exit status if we do not execute another command

This commit is contained in:
apio 2022-10-26 19:39:04 +02:00
parent 5492b1b44d
commit 23b12d2d56

View File

@ -170,7 +170,11 @@ void command_concat_char(command* cmd, char c)
else if (c == '\n')
{
putchar(c);
if (cmd->size == 0) show_prompt();
if (cmd->size == 0)
{
status = 0;
show_prompt();
}
else
command_execute(cmd);
}