aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_check_empty_line.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_check_empty_line.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ft_check_empty_line.c b/src/ft_check_empty_line.c
new file mode 100644
index 0000000..7f58205
--- /dev/null
+++ b/src/ft_check_empty_line.c
@@ -0,0 +1,16 @@
+#include <libft.h>
+#include <cub3d.h>
+
+void
+ft_check_empty_line(int fd, unsigned int linum, t_win *wlist)
+{
+ char *line;
+
+ get_next_line(fd, &line);
+ if (*line)
+ {
+ ft_memdel(line);
+ ft_map_error(linum, wlist);
+ }
+ ft_memdel(line);
+}