aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_warp_level.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-22 17:09:51 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-22 17:09:51 +0100
commit9b031810af331230780c24d0993b7c07b992b49a (patch)
treebb9c96d7c5378ecd28a98823ebcc465e74abb2a1 /src/ft_warp_level.c
parentReduced life number width (diff)
download42-cub3d-9b031810af331230780c24d0993b7c07b992b49a.tar.gz
42-cub3d-9b031810af331230780c24d0993b7c07b992b49a.tar.bz2
42-cub3d-9b031810af331230780c24d0993b7c07b992b49a.tar.xz
42-cub3d-9b031810af331230780c24d0993b7c07b992b49a.tar.zst
42-cub3d-9b031810af331230780c24d0993b7c07b992b49a.zip
Secured segv
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r--src/ft_warp_level.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index 88ab45d..5418a86 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -40,6 +40,8 @@ static void
static int8_t
ft_reinit_some(t_cub *cl)
{
+ int8_t i;
+
ft_player_keepings(cl);
cl->f_rgb = ft_init_rgb();
cl->c_rgb = ft_init_rgb();
@@ -53,6 +55,12 @@ static int8_t
return (-1);
if (ft_init_map(&cl->mlist) < 0)
return (-1);
+ i = 0;
+ while (i < 5)
+ {
+ cl->key_input[i] = -1;
+ i++;
+ }
return (0);
}