Better usage string and argc handler

This commit is contained in:
Timo Schmidt 2023-03-19 17:14:08 +01:00
parent 5ce20eb301
commit 948354d97a
1 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
/* By: jtorrez- <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/18 20:15:26 by jtorrez- #+# #+# */
/* Updated: 2023/03/19 06:20:53 by tischmid ### ########.fr */
/* Updated: 2023/03/19 17:13:50 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
@ -26,11 +26,11 @@ int main(int argc, char *argv[])
int width;
int height;
if (argc != 3)
if (argc != 1 && argc != 3)
{
ft_putstr("Usage: ");
ft_putstr(argv[0]);
ft_putstr(" [width] [height]\n");
ft_putstr(" [WIDTH HEIGHT]\n");
return (1);
}
width = ft_atoi(argv[1]);