Skip to content

Commit

Permalink
Added more bad maps for testing in maps/bad_maps/ folder, added missi…
Browse files Browse the repository at this point in the history
…ng ft_free_all() call at the end of main() to free **map mem in case the program ran succesfully
  • Loading branch information
Jean Teissier authored and Jean Teissier committed Aug 16, 2024
1 parent 300c20d commit ec8c7bf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions maps/bad_maps/bad_start_pos.cub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1111110
1S00001
100N001
1000001
1101111
100 000001
111111100011111
7 changes: 7 additions & 0 deletions maps/bad_maps/invalid_char.cub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1111110
1800001
100N001
1000001
1101111
100 R00001
111111100011111
7 changes: 7 additions & 0 deletions maps/bad_maps/open_map.cub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1111110
1000001
100N000
0000001
1101111
100 000001
111111100011111
3 changes: 2 additions & 1 deletion srcs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: jteissie <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/15 12:03:33 by tsuchen #+# #+# */
/* Updated: 2024/08/16 19:29:07 by jteissie ### ########.fr */
/* Updated: 2024/08/16 19:40:02 by jteissie ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -42,6 +42,7 @@ int main(int ac, char *av[])
return (EXIT_FAILURE);
if (parse_map(&data) == PANIC)
return (EXIT_FAILURE);
ft_free_all(data.map);
close(data.map_fd);
return (0);
}

0 comments on commit ec8c7bf

Please sign in to comment.