corrige deux bad read or write due au depassement de la taille de map, en ajoutant total_num dans la struct

This commit is contained in:
Hugo LAMY
2019-05-28 17:35:34 +02:00
parent 77656ba113
commit ed06e3eb8e
7 changed files with 23 additions and 31 deletions

9
main.c
View File

@@ -6,7 +6,7 @@
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/12 13:20:48 by vmanzoni #+# #+# */
/* Updated: 2019/05/27 18:21:58 by hulamy ### ########.fr */
/* Updated: 2019/05/28 17:26:07 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -83,12 +83,7 @@ int main(int ac, char **av)
if (ac == 2 || mdp)
{
if (!(input = read_file(av[1])))
{
if (dope[3])
print_error("error: Could not read file.\n");
else
print_error("error\n");
}
print_error(dope[3] ? "error: Could not read file.\n" : "error\n");
check_file_errors(input, dope);
size = parse_input(input, &list, dope);
print_final_map(list, size);