aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_sprite_tex.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 19:26:33 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 19:26:33 +0100
commita1ea0b4d5f6b27d9983a7702491b00dbe2bab610 (patch)
tree0f7d32a2c8b2fe0e816d6a0d01b4cab47005b824 /src/ft_get_sprite_tex.c
parentstrdups (diff)
download42-cub3d-a1ea0b4d5f6b27d9983a7702491b00dbe2bab610.tar.gz
42-cub3d-a1ea0b4d5f6b27d9983a7702491b00dbe2bab610.tar.bz2
42-cub3d-a1ea0b4d5f6b27d9983a7702491b00dbe2bab610.tar.xz
42-cub3d-a1ea0b4d5f6b27d9983a7702491b00dbe2bab610.tar.zst
42-cub3d-a1ea0b4d5f6b27d9983a7702491b00dbe2bab610.zip
Not ignoring get_next_line return value anymore
Diffstat (limited to 'src/ft_get_sprite_tex.c')
-rw-r--r--src/ft_get_sprite_tex.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ft_get_sprite_tex.c b/src/ft_get_sprite_tex.c
index b246b5e..308ff84 100644
--- a/src/ft_get_sprite_tex.c
+++ b/src/ft_get_sprite_tex.c
@@ -8,11 +8,10 @@ ft_get_sprite_tex(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(7, wlist));
}
if (!(*words) || ft_strcmp(*words, "S") || !words[1] || words[2])
{