diff options
author | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 19:42:05 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z3r8p1.le-101.fr> | 2020-02-13 19:42:05 +0100 |
commit | e29dd2fa3688e1e96a25af3b651da574af08aa90 (patch) | |
tree | cb6486fc91f1b93e61e4dcda25d359095e6aa108 /src/ft_parse_map.c | |
parent | Better code structure (diff) | |
download | 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.gz 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.bz2 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.xz 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.tar.zst 42-cub3d-e29dd2fa3688e1e96a25af3b651da574af08aa90.zip |
Splited structs
Diffstat (limited to '')
-rw-r--r-- | src/ft_parse_map.c | 10 |
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) |