diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-01-27 20:36:43 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-01-27 20:36:43 +0100 |
commit | c72cf43c89fd216af50c8d209c64d8b6ff188a1c (patch) | |
tree | 0a7f58ae43eea281469543a5726ca7e31ad9713e /src/ft_get_map.c | |
parent | Even nicer (diff) | |
download | 42-cub3d-c72cf43c89fd216af50c8d209c64d8b6ff188a1c.tar.gz 42-cub3d-c72cf43c89fd216af50c8d209c64d8b6ff188a1c.tar.bz2 42-cub3d-c72cf43c89fd216af50c8d209c64d8b6ff188a1c.tar.xz 42-cub3d-c72cf43c89fd216af50c8d209c64d8b6ff188a1c.tar.zst 42-cub3d-c72cf43c89fd216af50c8d209c64d8b6ff188a1c.zip |
Okkokokokokok
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); |