mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
fix(texture setting): Fixed leak when map starts before all textures are set
This commit is contained in:
parent
01a8119fe2
commit
cf93847129
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/06/21 19:35:43 by tchampio #+# #+# */
|
||||
/* Updated: 2025/07/22 12:36:22 by kcolin ### ########.fr */
|
||||
/* Updated: 2025/07/22 18:37:54 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ int set_textures(char *line, t_mapdata *map)
|
|||
|
||||
tab = ft_split(line, ' ');
|
||||
if (tab[0][0] == '1')
|
||||
return (ft_strlcpy(map->error,
|
||||
return (free_map(map), ft_strlcpy(map->error,
|
||||
"Map started before all the textures", ERRLEN), 1);
|
||||
retvalue = 0;
|
||||
if (tab[0] && tab[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue