aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_key_loop.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_key_loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index e2e2b5c..1d463bc 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -53,7 +53,8 @@ static void
pl = &cl->plist;
x = ft_find_x(key, pl);
y = ft_find_y(key, pl);
- if (cl->mlist.map[y][x] == '1' || cl->mlist.map[y][x] == '2')
+ if (ft_ischarset(FT_CHRST_COLLISION, cl->mlist.map[y][x]) ||
+ cl->mlist.map[y][x] == '\0')
{
pl->pos_y = old_y;
pl->pos_x = old_x;