diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-05 14:12:03 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-05 14:12:03 +0100 |
commit | e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33 (patch) | |
tree | 7b5e2219785805cefc80bd209c892df42679c303 /src/ft_parse_map.c | |
parent | Better code (diff) | |
download | 42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.gz 42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.bz2 42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.xz 42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.tar.zst 42-cub3d-e6bbc5e1a7d1b88a5ed241283ec19fbaa672dc33.zip |
Bug fix
Diffstat (limited to 'src/ft_parse_map.c')
-rw-r--r-- | src/ft_parse_map.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index 5a72bd8..58df20a 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -119,8 +119,9 @@ void ft_check_map_last_line(clist); ft_get_player_spawn(clist->plist, clist); ft_check_missing(clist); - clist->scale = ((uint16_t)clist->wlist->x_size / - (uint16_t)clist->map_w) - 1; + if ((clist->scale = ((uint16_t)clist->wlist->x_size / + (uint16_t)clist->map_w) - 1) < 1) + clist->scale = 1; ft_print_list(clist); close(fd); } |