aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 18:29:58 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 18:29:58 +0100
commitd978ec52497e4e3ff14b759dda68049f27a1957b (patch)
treeb1ca75a91cadbb414068ccda4002bebd6750b32c
parentMakefiles fix (diff)
download42-cub3d-d978ec52497e4e3ff14b759dda68049f27a1957b.tar.gz
42-cub3d-d978ec52497e4e3ff14b759dda68049f27a1957b.tar.bz2
42-cub3d-d978ec52497e4e3ff14b759dda68049f27a1957b.tar.xz
42-cub3d-d978ec52497e4e3ff14b759dda68049f27a1957b.tar.zst
42-cub3d-d978ec52497e4e3ff14b759dda68049f27a1957b.zip
Leak fix
-rw-r--r--map/map_one.cub2
-rw-r--r--src/ft_del_extra_sprites.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/map/map_one.cub b/map/map_one.cub
index 3dad2cc..e609a1b 100644
--- a/map/map_one.cub
+++ b/map/map_one.cub
@@ -19,7 +19,7 @@ T ./media/img/spikes.xpm
SH 2
111111111111111111
140000000000300001
-1000E0000000000001
+1000ET000000000001
100100000000300001
101100000111000001
111111111111110011
diff --git a/src/ft_del_extra_sprites.c b/src/ft_del_extra_sprites.c
index 91d09a2..21df608 100644
--- a/src/ft_del_extra_sprites.c
+++ b/src/ft_del_extra_sprites.c
@@ -24,8 +24,8 @@ void
i = 1;
while ((i + 2) <= cl->mlist.topsp)
{
- if (cl->tlist[i + 9].img)
- mlx_destroy_image(cl->wlist.wlx, cl->tlist[i + 9].img);
+ if (cl->tlist[i + 7].img)
+ mlx_destroy_image(cl->wlist.wlx, cl->tlist[i + 7].img);
i++;
}
}