diff options
Diffstat (limited to 'src/ft_get_traps.c')
-rw-r--r-- | src/ft_get_traps.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ft_get_traps.c b/src/ft_get_traps.c index b7d12e1..2d652f8 100644 --- a/src/ft_get_traps.c +++ b/src/ft_get_traps.c @@ -1,7 +1,7 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ft_get_tex_nl.c :+: :+: :+: */ +/* ft_get_traps.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -31,6 +31,8 @@ void if (clist->mlist.map[y][x] == 'T') { clist->mlist.traps_nbr++; + if (clist->mlist.traps_nbr > 512) + ft_map_error(FT_ERR_TOO_MUCH_TRAPS, clist); clist->traps[i].s_pos_x = x; clist->traps[i].s_pos_y = y; i++; |