From e29dd2fa3688e1e96a25af3b651da574af08aa90 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Thu, 13 Feb 2020 19:42:05 +0100 Subject: Splited structs --- src/ft_parse_map.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/ft_parse_map.c') 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) -- cgit v1.2.3