aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_parse_map.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-03-09 17:41:08 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-03-09 17:41:08 +0100
commitfffd37b3423720af58c416221ffbdbc5960b1439 (patch)
treed5f8c2946fff86e5bcc533484cf886bfd92c048e /src/ft_parse_map.c
parentPerf (diff)
download42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.gz
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.bz2
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.xz
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.zst
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.zip
Norme
Diffstat (limited to 'src/ft_parse_map.c')
-rw-r--r--src/ft_parse_map.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c
index a93cca3..f1df73d 100644
--- a/src/ft_parse_map.c
+++ b/src/ft_parse_map.c
@@ -6,7 +6,7 @@
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/14 17:28:56 by rbousset #+# #+# */
-/* Updated: 2020/02/14 17:28:56 by rbousset ### ########lyon.fr */
+/* Updated: 2020/03/09 17:27:29 by rbousset ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -64,14 +64,12 @@ static int8_t
return (ft_parse_it(fd, clist));
}
if (ft_ischarset("1 ", line[0]))
- return ((ft_get_map_first_line(line, clist) < 0) ?
- (-1) : (FT_PARSE_END_RET));
- if (!ft_ischarset(FT_CHRST_VALID_PARSE, line[0])
- || !(words = ft_split(line, ' ')))
+ return ((ft_get_map_first_line(line, clist) < 0) ? (-1) : (25));
+ if (!ft_ischarset(FT_CHRST_VALID_PARSE, line[0]) ||
+ !(words = ft_split(line, ' ')))
return (ft_error_here(FT_ERR_ILL_ENTRY, line, clist));
if ((ret = ft_select_get(words, clist)) == FT_PARSE_END_RET)
- return ((ft_get_map_first_line(line, clist) < 0) ?
- (-1) : (FT_PARSE_END_RET));
+ return ((ft_get_map_first_line(line, clist) < 0) ? (-1) : (25));
ft_memdel((void**)&line);
return (ret);
}