aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-03 18:56:05 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-03 18:56:05 +0100
commita02e6e92456112c0d298c0bed69220cc19d5f0dc (patch)
treef214ad2184117e2d47dafff56ccac9dc95b217a8 /src
parentI can't turn (diff)
download42-cub3d-a02e6e92456112c0d298c0bed69220cc19d5f0dc.tar.gz
42-cub3d-a02e6e92456112c0d298c0bed69220cc19d5f0dc.tar.bz2
42-cub3d-a02e6e92456112c0d298c0bed69220cc19d5f0dc.tar.xz
42-cub3d-a02e6e92456112c0d298c0bed69220cc19d5f0dc.tar.zst
42-cub3d-a02e6e92456112c0d298c0bed69220cc19d5f0dc.zip
vim style
Diffstat (limited to '')
-rw-r--r--src/ft_get_map.c3
-rw-r--r--src/main.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/ft_get_map.c b/src/ft_get_map.c
index b64da72..a0ddfbb 100644
--- a/src/ft_get_map.c
+++ b/src/ft_get_map.c
@@ -82,10 +82,9 @@ int
i = 1;
ret = 1;
- while (ret > 0)
+ while ((ret = get_next_line(fd, &line)) > 0)
{
clist->line_chk += 1;
- ret = get_next_line(fd, &line);
if (!line[0] || ft_check_map_line(line, 0, clist) < 0
|| ft_cat_mapl(line, i, clist) < 0)
{
diff --git a/src/main.c b/src/main.c
index b9f4514..a660128 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,7 +31,7 @@ int
ft_memdel((void**)&clist);
return (1);
}
- ft_parse_map("map/map_one.cub", clist);
+ ft_parse_map("map/map_vim.cub", clist);
if (ft_init_winlx(clist) < 0)
return (ft_exit(3, clist));
mlx_key_hook(clist->wlist->winptr, ft_key_event, clist);