From a752af80e3778b8a17b53b49b11ed235494a623d Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 11 Mar 2020 01:44:15 +0100 Subject: Sliding like a champ --- src/ft_key_loop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c index d40de34..d3e871b 100644 --- a/src/ft_key_loop.c +++ b/src/ft_key_loop.c @@ -53,12 +53,12 @@ static void pl = &cl->plist; x = ft_find_x(key, pl); y = ft_find_y(key, pl); - if (ft_ischarset(FT_CHRST_COLLISION, cl->mlist.map[y][x]) || - cl->mlist.map[y][x] == '\0') - { - pl->pos_y = old_y; + if (ft_ischarset(FT_CHRST_COLLISION, cl->mlist.map[(uint64_t)old_y][x]) || + cl->mlist.map[(uint64_t)old_y][x] == '\0') pl->pos_x = old_x; - } + if (ft_ischarset(FT_CHRST_COLLISION, cl->mlist.map[y][(uint64_t)old_x]) || + cl->mlist.map[y][(uint64_t)old_x] == '\0') + pl->pos_y = old_y; } int -- cgit v1.2.3