diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-26 16:11:56 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-26 16:11:56 +0100 |
commit | 7f57c427d26d8b0c63feac5d0e7b8249707913eb (patch) | |
tree | c5bcb6957791278a2e66bfa994ba72eff6241811 /src/ft_init_map.c | |
parent | Ok (diff) | |
download | 42-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.c | 6 |
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; |