presque toutes les erreures de vlgrind resolues, sauf une derniere dans error_proxy
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/03/01 13:29:05 by vmanzoni #+# #+# */
|
/* Created: 2019/03/01 13:29:05 by vmanzoni #+# #+# */
|
||||||
/* Updated: 2019/05/28 17:27:17 by hulamy ### ########.fr */
|
/* Updated: 2019/05/28 19:35:38 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -119,13 +119,13 @@ int check_tetri_errors_proxy(char *tetri)
|
|||||||
j = 0;
|
j = 0;
|
||||||
while (tetri[i])
|
while (tetri[i])
|
||||||
{
|
{
|
||||||
if (tetri[i] == '#' && tetri[i + 1] == '#')
|
if (i < 19 && tetri[i] == '#' && tetri[i + 1] == '#')
|
||||||
j++;
|
j++;
|
||||||
if (tetri[i] == '#' && tetri[i - 1] == '#')
|
if (i > 0 && tetri[i] == '#' && tetri[i - 1] == '#')
|
||||||
j++;
|
j++;
|
||||||
if (tetri[i] == '#' && tetri[i + 5] == '#')
|
if (i < 15 && tetri[i] == '#' && tetri[i + 5] == '#')
|
||||||
j++;
|
j++;
|
||||||
if (tetri[i] == '#' && tetri[i - 5] == '#')
|
if (i > 4 && tetri[i] == '#' && tetri[i - 5] == '#')
|
||||||
j++;
|
j++;
|
||||||
if (tetri[i] == '.' || tetri[i] == '\n')
|
if (tetri[i] == '.' || tetri[i] == '\n')
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/04/15 14:48:14 by vmanzoni #+# #+# */
|
/* Created: 2019/04/15 14:48:14 by vmanzoni #+# #+# */
|
||||||
/* Updated: 2019/05/28 17:27:44 by hulamy ### ########.fr */
|
/* Updated: 2019/05/28 19:05:05 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/04/13 12:09:46 by vmanzoni #+# #+# */
|
/* Created: 2019/04/13 12:09:46 by vmanzoni #+# #+# */
|
||||||
/* Updated: 2019/05/28 17:02:19 by hulamy ### ########.fr */
|
/* Updated: 2019/05/28 18:36:35 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ char *read_file(char *file)
|
|||||||
|| ((rv = read(fd, &buf, BUFF_SIZE)) < 0) \
|
|| ((rv = read(fd, &buf, BUFF_SIZE)) < 0) \
|
||||||
|| !(result = malloc(sizeof(char) * rv)))
|
|| !(result = malloc(sizeof(char) * rv)))
|
||||||
return (NULL);
|
return (NULL);
|
||||||
buf[rv] = '\0';
|
buf[rv - 1] = '\0';
|
||||||
i = -1;
|
i = -1;
|
||||||
while (buf[++i])
|
while (buf[++i])
|
||||||
result[i] = buf[i];
|
result[i] = buf[i];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2019/04/27 20:47:22 by hulamy #+# #+# */
|
/* Created: 2019/04/27 20:47:22 by hulamy #+# #+# */
|
||||||
/* Updated: 2019/05/28 17:33:43 by hulamy ### ########.fr */
|
/* Updated: 2019/05/28 18:19:15 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -161,8 +161,8 @@ int search_map(t_fillist *list)
|
|||||||
if (!(map = (unsigned int *)malloc(sizeof(*map) * num)))
|
if (!(map = (unsigned int *)malloc(sizeof(*map) * num)))
|
||||||
return (0);
|
return (0);
|
||||||
check_same_tetri(list, num);
|
check_same_tetri(list, num);
|
||||||
while (num)
|
while (num--)
|
||||||
map[num--] = 0;
|
map[num] = 0;
|
||||||
i = fill_map(map, list, size++);
|
i = fill_map(map, list, size++);
|
||||||
}
|
}
|
||||||
return (print_binary_map(map, size, list->dope));
|
return (print_binary_map(map, size, list->dope));
|
||||||
|
|||||||
Reference in New Issue
Block a user