From 75f4e05c5cb3433f4b71ddeb4264e0ff86e05b87 Mon Sep 17 00:00:00 2001 From: Ladebeze66 Date: Tue, 30 Jan 2024 14:58:49 +0100 Subject: [PATCH] argv1 --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index ab59b75..041e79e 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: fgras-ca +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/15 18:45:52 by fgras-ca #+# #+# */ -/* Updated: 2024/01/29 15:11:41 by fgras-ca ### ########.fr */ +/* Updated: 2024/01/30 14:57:34 by fgras-ca ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,12 +15,12 @@ int setup_and_load_map(int argc, char **argv, t_structure_main *w, t_texture *textures) { - if (argc > 2) + if (argc != 2) { - fprintf(stderr, "Usage: %s\n", argv[0]); + fprintf(stderr, "Usage: %s \n", argv[0]); return (0); } - if (!load_cub_file("map.cub", textures, &w->s_map)) + if (!load_cub_file(argv[1], textures, &w->s_map)) { printf("Failed to load the map or map is not closed. Exiting...\n"); return (0);