From 99143755522989d11ee5dd9b42a665e2368c9481 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 29 Jan 2020 20:09:29 +0100 Subject: it's wonderful --- src/ft_get_map_redo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ft_get_map_redo.c') diff --git a/src/ft_get_map_redo.c b/src/ft_get_map_redo.c index be6f987..2f020f9 100644 --- a/src/ft_get_map_redo.c +++ b/src/ft_get_map_redo.c @@ -72,9 +72,10 @@ ft_get_map_core(int fd, t_cub *clist) { clist->line_chk += 1; ret = get_next_line(fd, &line); - if (ret < 0 || !line[0] || ft_check_map_line(line, 0, clist) < 0) + if (ret < 0) return (-1); - if (ft_cat_mapl(line, i, clist) < 0) + if (!line[0] || ft_check_map_line(line, 0, clist) < 0 + || ft_cat_mapl(line, i, clist) < 0) { ft_memdel(line); return (-1); -- cgit v1.2.3