mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
fix: allow empty lines between texture definitions
This commit is contained in:
parent
5b9c293503
commit
40e0673425
1 changed files with 4 additions and 2 deletions
|
|
@ -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/17 14:46:29 by kcolin ### ########.fr */
|
/* Updated: 2025/07/21 12:48:50 by kcolin ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -78,7 +78,9 @@ bool add_textures(int fd, t_mapdata *map)
|
||||||
set_lines = 0;
|
set_lines = 0;
|
||||||
while (line && set_lines < 6)
|
while (line && set_lines < 6)
|
||||||
{
|
{
|
||||||
if (!set_textures(line, map))
|
if (line[0] == '\0' || line[0] == '\n')
|
||||||
|
;
|
||||||
|
else if (!set_textures(line, map))
|
||||||
return (free(line), gnl_exhaust(fd), false);
|
return (free(line), gnl_exhaust(fd), false);
|
||||||
else
|
else
|
||||||
set_lines++;
|
set_lines++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue