aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_map.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-26 16:11:56 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-26 16:11:56 +0100
commit7f57c427d26d8b0c63feac5d0e7b8249707913eb (patch)
treec5bcb6957791278a2e66bfa994ba72eff6241811 /src/ft_init_map.c
parentOk (diff)
download42-cub3d-7f57c427d26d8b0c63feac5d0e7b8249707913eb.tar.gz
42-cub3d-7f57c427d26d8b0c63feac5d0e7b8249707913eb.tar.bz2
42-cub3d-7f57c427d26d8b0c63feac5d0e7b8249707913eb.tar.xz
42-cub3d-7f57c427d26d8b0c63feac5d0e7b8249707913eb.tar.zst
42-cub3d-7f57c427d26d8b0c63feac5d0e7b8249707913eb.zip
Stack overflow fix
Diffstat (limited to 'src/ft_init_map.c')
-rw-r--r--src/ft_init_map.c6
1 files changed, 3 insertions, 3 deletions
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;