From dea350d9256a909d780610352fc21c871cd40b66 Mon Sep 17 00:00:00 2001 From: gwojda Date: Tue, 7 Mar 2017 11:21:21 +0100 Subject: [PATCH] fixe bug history --- 42sh/src/line-editing/readline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/42sh/src/line-editing/readline.c b/42sh/src/line-editing/readline.c index 770d2163..f9bf13df 100644 --- a/42sh/src/line-editing/readline.c +++ b/42sh/src/line-editing/readline.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */ -/* Updated: 2017/03/04 16:50:05 by ariard ### ########.fr */ +/* Updated: 2017/03/07 11:20:27 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -39,6 +39,8 @@ void ft_init_history(void) return ; while (get_next_line(fd, &str) > 0) { + if (!*str) + continue ; ft_push_back_history(&data_singleton()->line.list_beg, ft_create_history_list(str)); free(str);