Better usage string and argc handler
This commit is contained in:
parent
5ce20eb301
commit
948354d97a
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue