From e458d0a5dfe616272b9e683ac0d2a156a44f59ef Mon Sep 17 00:00:00 2001 From: Timo Schmidt Date: Sun, 19 Mar 2023 03:45:44 +0100 Subject: [PATCH] Fix a bug that allows passing a height bigger than height-3 --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 1e1a348..8f4bead 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: jtorrez- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/18 20:15:26 by jtorrez- #+# #+# */ -/* Updated: 2023/03/19 03:30:40 by tischmid ### ########.fr */ +/* Updated: 2023/03/19 03:45:07 by tischmid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) height = ft_atoi(argv[2]); if (width > max_width) return (wrong_dimension("width", max_width, width)); - else if (height > max_height) + else if (height > max_height - 3) return (wrong_dimension("height", max_height - 3, height)); rush(width, height); return (0);