diff --git a/ex00/main.c b/ex00/main.c index c65d115..16f9b87 100644 --- a/ex00/main.c +++ b/ex00/main.c @@ -6,7 +6,7 @@ /* By: jtorrez- +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/18 20:15:26 by jtorrez- #+# #+# */ -/* Updated: 2023/03/19 17:20:41 by tischmid ### ########.fr */ +/* Updated: 2023/03/19 18:07:42 by tischmid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,26 +21,24 @@ void ft_putstr(char *str); // Also fails if the passed arguments are out of // bounds (200 for width, 100 for height). // argv[0] contains the path of the executable, eg ./rush00 -#include int main(int argc, char *argv[]) { int width; int height; + width = 5; + height = 3; if (argc != 1 && argc != 3) { ft_putstr("Usage: "); ft_putstr(argv[0]); ft_putstr(" [WIDTH HEIGHT]\n"); } - if (argc == 1) + if (argc == 3) { width = ft_atoi(argv[1]); height = ft_atoi(argv[2]); } - else - width = 5; - height = 3; if (width >= 200) ft_putstr("Width must be less than 200\n"); else if (height >= 100) diff --git a/ex00/rush00 b/ex00/rush00 index 72d3d3b..1690771 100755 Binary files a/ex00/rush00 and b/ex00/rush00 differ