From 7f57c427d26d8b0c63feac5d0e7b8249707913eb Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 26 Mar 2020 16:11:56 +0100 Subject: Stack overflow fix --- src/ft_init_map.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ft_init_map.c') diff --git a/src/ft_init_map.c b/src/ft_init_map.c index fb03bfd..b3bfa46 100644 --- a/src/ft_init_map.c +++ b/src/ft_init_map.c @@ -45,7 +45,7 @@ static int8_t uint8_t i; i = 0; - while (i < 9) + while (i < 8) { if (!(mlist->sprite_path[i] = (char*)ft_calloc(1, sizeof(char)))) return (-1); @@ -65,8 +65,8 @@ int8_t mlist->weapon_var = 0; mlist->topsp = 0; ft_bzero(mlist->sprite_nbr, 8); - ft_bzero(mlist->sprite_order, 4096); - ft_bzero(mlist->st_o, 4096); + ft_bzero(mlist->sprite_order, 8); + ft_bzero(mlist->st_o, 8); ft_bzero(mlist->traps_order, 512); ft_bzero(mlist->heals_order, 64); mlist->weaps_nbr[0] = 0; -- cgit v1.2.3