Skip to content

Commit

Permalink
Fixes accidental textdata initalization removal in parser.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Haliris authored Aug 29, 2024
1 parent f95244a commit 438f18b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions srcs/parser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,17 @@ t_parse_status verify_map(char **map, t_data *data)
int parse_map(t_data *data)
{
data->map = build_map(data);
close(data->map_fd);
if (!data->map)
return (PANIC);
data->textures = get_textures_info(data->map_path, data);
if (!data->textures)
{
close(data->map_fd);
ft_putstr_fd("Error\n", STDERR_FILENO);
return (ft_free_all(data->map), PANIC);
}
close(data->map_fd);
if (verify_map(data->map, data) == MAP_ERR)
{
ft_putstr_fd("Error\n", STDERR_FILENO);
Expand Down

0 comments on commit 438f18b

Please sign in to comment.