From 9b031810af331230780c24d0993b7c07b992b49a Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 22 Mar 2020 17:09:51 +0100 Subject: Secured segv --- src/ft_warp_level.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ft_warp_level.c') 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); } -- cgit v1.2.3