Archived
1
0

so_long fixed

This commit is contained in:
Adam Joly
2024-01-30 08:28:45 +01:00
parent 15b156df0c
commit e1a6240d81
10 changed files with 67 additions and 70 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/26 14:29:02 by adjoly #+# #+# */
/* Updated: 2024/01/28 18:22:49 by adjoly ### ########.fr */
/* Updated: 2024/01/30 08:15:50 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -39,13 +39,6 @@ char ft_valid_file_ext(char *file_name)
return (1);
}
char ft_is_empty(char **map)
{
if (map[0][0] == '\0')
return (1);
return (0);
}
void ft_read_file_to_end(int fd)
{
char *gnl;

View File

@ -6,12 +6,11 @@
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/26 01:31:27 by adjoly #+# #+# */
/* Updated: 2024/01/27 13:58:18 by adjoly ### ########.fr */
/* Updated: 2024/01/30 08:16:46 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "../so_long.h"
#include <stdlib.h>
char ft_check_reselement(t_elemcount *count)
{

View File

@ -6,13 +6,11 @@
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/17 10:17:52 by adjoly #+# #+# */
/* Updated: 2024/01/28 15:18:38 by adjoly ### ########.fr */
/* Updated: 2024/01/30 08:15:43 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "../so_long.h"
#include <stddef.h>
#include <unistd.h>
char ft_checkcol(char **map, char c, unsigned short col)
{
@ -84,11 +82,6 @@ void ft_check_map_error(char **map)
p_coords = malloc(sizeof(t_coords));
if (!p_coords)
ft_send_error("Memory allocation failed\n", map);
if (ft_is_empty(map) == 1)
{
free(p_coords);
ft_send_error("Map is empty", map);
}
if (ft_valid_char(map) == 1)
{
free(p_coords);