diff options
Diffstat (limited to 'src/ft_get_map_redo.c')
-rw-r--r-- | src/ft_get_map_redo.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |