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> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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;
|
||||
while (tetri[i])
|
||||
{
|
||||
if (tetri[i] == '#' && tetri[i + 1] == '#')
|
||||
if (i < 19 && tetri[i] == '#' && tetri[i + 1] == '#')
|
||||
j++;
|
||||
if (tetri[i] == '#' && tetri[i - 1] == '#')
|
||||
if (i > 0 && tetri[i] == '#' && tetri[i - 1] == '#')
|
||||
j++;
|
||||
if (tetri[i] == '#' && tetri[i + 5] == '#')
|
||||
if (i < 15 && tetri[i] == '#' && tetri[i + 5] == '#')
|
||||
j++;
|
||||
if (tetri[i] == '#' && tetri[i - 5] == '#')
|
||||
if (i > 4 && tetri[i] == '#' && tetri[i - 5] == '#')
|
||||
j++;
|
||||
if (tetri[i] == '.' || tetri[i] == '\n')
|
||||
i++;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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) \
|
||||
|| !(result = malloc(sizeof(char) * rv)))
|
||||
return (NULL);
|
||||
buf[rv] = '\0';
|
||||
buf[rv - 1] = '\0';
|
||||
i = -1;
|
||||
while (buf[++i])
|
||||
result[i] = buf[i];
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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)))
|
||||
return (0);
|
||||
check_same_tetri(list, num);
|
||||
while (num)
|
||||
map[num--] = 0;
|
||||
while (num--)
|
||||
map[num] = 0;
|
||||
i = fill_map(map, list, size++);
|
||||
}
|
||||
return (print_binary_map(map, size, list->dope));
|
||||
|
||||
Reference in New Issue
Block a user