diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_check_map_line.c | 4 | ||||
-rw-r--r-- | src/ft_init_lists.c | 2 | ||||
-rw-r--r-- | src/ft_parse_map.c | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/ft_check_map_line.c b/src/ft_check_map_line.c index 5ca8bcf..13baaef 100644 --- a/src/ft_check_map_line.c +++ b/src/ft_check_map_line.c @@ -45,8 +45,8 @@ int8_t if (!ft_ischarset("012NSEW ", line[i])) return (-1); if (ft_ischarset("NSEW", line[i])) - clist->nsew += 1; - if (clist->nsew > 1) + clist->isspawn += 1; + if (clist->isspawn > 1) return (-1); } else diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 02ca36c..f81e256 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -54,6 +54,6 @@ t_cub clist->c_color = -1; clist->map_w = 0; clist->line_chk = 0; - clist->nsew = 0; + clist->isspawn = 0; return (clist); } diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index eb69e28..41cab3d 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -113,7 +113,6 @@ void ret = ft_parse_it(fd, clist); if (ret == -1) ft_map_error(clist); - clist->nsew = 0; if (ft_get_map_core(fd, clist) < 0) ft_map_error(clist); ft_check_map_last_line(clist); |