mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
fix: Fix crash when no map
This commit is contained in:
parent
cf3801702d
commit
4a513e9877
2 changed files with 4 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:54:36 by kcolin #+# #+# */
|
||||
/* Updated: 2025/08/19 20:07:29 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/10/07 13:49:26 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
# define ENOCUB "Not a .cub file"
|
||||
# define EOPEN "Can't open file"
|
||||
# define EMALMAP "Map is malformed (invalid chars or missing walls)"
|
||||
# define ENOPLAYER "No player"
|
||||
# define ENOPLAYER "No player or no map (monster!!)"
|
||||
# define EHOLES "Holes in map"
|
||||
# define ETRAILING "Trailing chars after map"
|
||||
# define EBADCHARCOLOR "invalid characters in color definition"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/07/17 14:15:26 by kcolin #+# #+# */
|
||||
/* Updated: 2025/10/03 23:51:46 by tchampio ### ########.fr */
|
||||
/* Updated: 2025/10/07 13:48:17 by tchampio ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ bool check_bare_minimum(t_mapdata *map)
|
|||
|
||||
i = 0;
|
||||
spawncount = 0;
|
||||
while (map->map[i])
|
||||
while (map->map && map->map[i])
|
||||
{
|
||||
j = 0;
|
||||
while (map->map[i][j])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue