aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_parse_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_parse_map.c')
-rw-r--r--src/ft_parse_map.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c
index a2c3b82..4b66d0c 100644
--- a/src/ft_parse_map.c
+++ b/src/ft_parse_map.c
@@ -47,16 +47,18 @@ static void
static void
ft_check_map_last_line(t_cub *clist)
{
+ t_map *ml;
size_t i;
size_t j;
i = 0;
- while (clist->map[i])
+ ml = clist->mlist;
+ while (ml->map[i])
i++;
j = 0;
- while (clist->map[i - 1][j])
+ while (ml->map[i - 1][j])
{
- if (clist->map[i - 1][j] != '1' && clist->map[i - 1][j] != '\0')
+ if (ml->map[i - 1][j] != '1' && ml->map[i - 1][j] != '\0')
ft_map_error(clist);
j++;
}
@@ -76,7 +78,7 @@ static int8_t
char **words;
int ret;
- clist->line_chk += 1;
+ clist->mlist->line_chk += 1;
if ((ret = get_next_line(fd, &line)) < 0)
return (ft_map_error(clist));
if (ret == 0)