diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-18 22:40:47 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-18 22:40:47 +0100 |
commit | 3520f4bf3d435991f402e46731c15838baae0894 (patch) | |
tree | c8cbf06ebd69a422cbcf2cb8381916af172da726 /src/ft_get_traps.c | |
parent | Still sfx to do (diff) | |
parent | Bug fix (diff) | |
download | 42-cub3d-3520f4bf3d435991f402e46731c15838baae0894.tar.gz 42-cub3d-3520f4bf3d435991f402e46731c15838baae0894.tar.bz2 42-cub3d-3520f4bf3d435991f402e46731c15838baae0894.tar.xz 42-cub3d-3520f4bf3d435991f402e46731c15838baae0894.tar.zst 42-cub3d-3520f4bf3d435991f402e46731c15838baae0894.zip |
Merge branch 'master' into weaps
Diffstat (limited to 'src/ft_get_traps.c')
-rw-r--r-- | src/ft_get_traps.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ft_get_traps.c b/src/ft_get_traps.c index b7d12e1..fef3179 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> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -19,7 +19,7 @@ void { size_t x; size_t y; - uint8_t i; + uint16_t i; x = 1; y = 1; @@ -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++; |