aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_res.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-01-29 23:21:16 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-01-29 23:21:16 +0100
commit3fe40e249fbad468347b2a0d643b19f1f5f3f524 (patch)
treef696e53265307a1b15b36c2d72bb6dfbd95a8885 /src/ft_get_res.c
parentit's wonderful (diff)
download42-cub3d-3fe40e249fbad468347b2a0d643b19f1f5f3f524.tar.gz
42-cub3d-3fe40e249fbad468347b2a0d643b19f1f5f3f524.tar.bz2
42-cub3d-3fe40e249fbad468347b2a0d643b19f1f5f3f524.tar.xz
42-cub3d-3fe40e249fbad468347b2a0d643b19f1f5f3f524.tar.zst
42-cub3d-3fe40e249fbad468347b2a0d643b19f1f5f3f524.zip
I've seen enough
Diffstat (limited to 'src/ft_get_res.c')
-rw-r--r--src/ft_get_res.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ft_get_res.c b/src/ft_get_res.c
index 6fecb74..372ebca 100644
--- a/src/ft_get_res.c
+++ b/src/ft_get_res.c
@@ -23,5 +23,8 @@ ft_get_res(char **words, t_cub *clist)
ft_checkdigit(words[2], clist);
clist->wlist->x_size = ft_atoi(words[1]);
clist->wlist->y_size = ft_atoi(words[2]);
+ if (clist->wlist->x_size < 10
+ || clist->wlist->y_size < 10)
+ return (-1);
return (0);
}