From 137c54bec149fa57b50427da1dd4e0785d2e8ce3 Mon Sep 17 00:00:00 2001 From: gwojda Date: Thu, 23 Mar 2017 10:52:43 +0100 Subject: [PATCH] prompt leaks #167 --- 42sh/src/line_editing/ft_prompt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/42sh/src/line_editing/ft_prompt.c b/42sh/src/line_editing/ft_prompt.c index 26bfafaf..c4d0201e 100644 --- a/42sh/src/line_editing/ft_prompt.c +++ b/42sh/src/line_editing/ft_prompt.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 13:51:33 by gwojda #+# #+# */ -/* Updated: 2017/03/19 18:07:11 by wescande ### ########.fr */ +/* Updated: 2017/03/23 10:52:08 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,10 +31,8 @@ static int promt_git_status(int fd) if (!get_next_line(fd, &tmp)) ft_printf("\x1b[38;5;83m ✓ "); else - { ft_printf("\x1b[38;5;1m ✗ "); - ft_strdel(&tmp); - } + ft_strdel(&tmp); while (get_next_line(fd, &tmp) > 0) ft_strdel(&tmp); ft_strdel(&tmp);