aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--map/map_one.cub2
-rw-r--r--src/ft_get_map_redo.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/map/map_one.cub b/map/map_one.cub
index 4ca0318..837c115 100644
--- a/map/map_one.cub
+++ b/map/map_one.cub
@@ -22,4 +22,4 @@ C 225,30,0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1
1 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 N 0 1
1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 0 1
-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \ No newline at end of file
diff --git a/src/ft_get_map_redo.c b/src/ft_get_map_redo.c
index a195227..a621282 100644
--- a/src/ft_get_map_redo.c
+++ b/src/ft_get_map_redo.c
@@ -82,6 +82,8 @@ ft_get_map_core(int fd, t_cub *clist)
i++;
}
clist->mapl[((clist->map_w + 1) * i) - 1] = '\0';
- ft_printf("mapl >>>> [%s]\n", clist->mapl);
+ ft_free_words(clist->map);
+ clist->map = ft_split(clist->mapl, '\n');
+ ft_memdel(clist->mapl);
return (0);
}