From a1ea0b4d5f6b27d9983a7702491b00dbe2bab610 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 24 Jan 2020 19:26:33 +0100 Subject: Not ignoring get_next_line return value anymore --- src/ft_get_res.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ft_get_res.c') diff --git a/src/ft_get_res.c b/src/ft_get_res.c index 8cf1809..337d3d7 100644 --- a/src/ft_get_res.c +++ b/src/ft_get_res.c @@ -19,11 +19,10 @@ ft_get_res(int fd, t_win *wlist) char *line; char **words; - get_next_line(fd, &line); - if (!(words = ft_split(line, ' '))) + if (get_next_line(fd, &line) <= 0 || !(words = ft_split(line, ' '))) { ft_memdel(line); - return (ft_exit(5, wlist)); + return (ft_map_error(1, wlist)); } if (!(*words) || ft_strcmp(*words, "R") || !(*(words + 1)) || !(*(words + 2)) || (*(words + 3))) -- cgit v1.2.3