diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_get_map.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ft_get_map.c b/src/ft_get_map.c index 06f3353..ff16df1 100644 --- a/src/ft_get_map.c +++ b/src/ft_get_map.c @@ -42,8 +42,16 @@ ft_check_err(char *line, size_t size) static char *ft_get_first_line(char *line, t_cub *clist) { + size_t i; char *mapl; + i = 0; + while (i < ft_strlen(line) && line[i]) + { + if (line[i] != '1' && line[i] != '\0') + return (NULL); + i += 2; + } clist->map_w = ft_strlen(line); if (clist->map_w <= 2 || ft_check_err(line, clist->map_w) < 0) return (NULL); |