Skip to content

Commit

Permalink
fixed ctrl+d and empty enter input together
Browse files Browse the repository at this point in the history
  • Loading branch information
¨Roman committed Nov 9, 2024
1 parent 1be3469 commit 7431559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void main_loop(t_ms_data *data, t_loop_data *loop_data)
set_signals_interactive(data);
set_signals_noninteractive();
loop_data->input = readline("🌴 maxishell> ");
if (loop_data->input[0] == '\0')
if (loop_data->input && loop_data->input[0] == '\0')
continue ;
if (!loop_data->input || !ft_strncmp(loop_data->input, "exit", 4))
{
Expand Down

0 comments on commit 7431559

Please sign in to comment.