Shell: Fix crash when executing semicolon

This fixes #4
This commit is contained in:
Bananymous 2026-02-13 17:47:41 +02:00
parent b3bbfaeff0
commit f022a1b08f
1 changed files with 6 additions and 0 deletions

View File

@ -274,6 +274,12 @@ BAN::ErrorOr<void> Execute::execute_command(const PipedCommand& piped_command)
}
);
if (piped_command.commands[i].arguments.empty())
{
child_codes[i] = 0;
continue;
}
const int fd_in = last_pipe_rd;
const int fd_out = new_pipe[1];