fix: Used the right free function for the split

My bad I used free_map() but I should've used free_tab() I must've been
tired or something.
This commit is contained in:
Theo Champion 2025-07-23 12:21:29 +02:00
parent d165aa0209
commit d52143e432

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */ /* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/06/21 19:35:43 by tchampio #+# #+# */ /* Created: 2025/06/21 19:35:43 by tchampio #+# #+# */
/* Updated: 2025/07/22 18:37:54 by tchampio ### ########.fr */ /* Updated: 2025/07/23 12:20:51 by tchampio ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -97,7 +97,7 @@ int set_textures(char *line, t_mapdata *map)
tab = ft_split(line, ' '); tab = ft_split(line, ' ');
if (tab[0][0] == '1') if (tab[0][0] == '1')
return (free_map(map), ft_strlcpy(map->error, return (free_tab(tab), ft_strlcpy(map->error,
"Map started before all the textures", ERRLEN), 1); "Map started before all the textures", ERRLEN), 1);
retvalue = 0; retvalue = 0;
if (tab[0] && tab[1]) if (tab[0] && tab[1])