aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_check_empty_line.c
blob: 5515c906c2510210e8d52b120f22112f567da4e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <libft.h>
#include <cub3d.h>

void
ft_check_empty_line(int fd, unsigned int linum, t_win *wlist)
{
	char	*line;

	if (get_next_line(fd, &line) <= 0)
	{
		ft_memdel(line);
		ft_map_error(linum, wlist);
	}
	if (*line)
	{
		ft_memdel(line);
		ft_map_error(linum, wlist);
	}
	ft_memdel(line);
}