fix(parser): Added message when there is no player in map

This commit is contained in:
Theo Champion 2025-07-21 13:09:41 +02:00 committed by Khaïs COLIN
parent 40e0673425
commit 3d9559088a

View file

@ -75,7 +75,7 @@ bool check_cubfile(char *file, t_mapdata *map)
"Map is malformed (invalid chars or missing walls)", 51),
false);
if (!check_bare_minimum(map))
return (close(fd), false);
return (close(fd), ft_strlcpy(map->error, "No players", 11), false);
map->isvalid = true;
flood_fill(map, map->startx, map->starty);
if (!map->isvalid)