diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-01-29 20:09:29 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-01-29 20:09:29 +0100 |
commit | 99143755522989d11ee5dd9b42a665e2368c9481 (patch) | |
tree | fee854ebc0efa04766180eaf9bd5830261d0025c /src/ft_get_map_redo.c | |
parent | Perfect (diff) | |
download | 42-cub3d-99143755522989d11ee5dd9b42a665e2368c9481.tar.gz 42-cub3d-99143755522989d11ee5dd9b42a665e2368c9481.tar.bz2 42-cub3d-99143755522989d11ee5dd9b42a665e2368c9481.tar.xz 42-cub3d-99143755522989d11ee5dd9b42a665e2368c9481.tar.zst 42-cub3d-99143755522989d11ee5dd9b42a665e2368c9481.zip |
it's wonderful
Diffstat (limited to '')
-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); |