corrected invalid read on print_map

caused by exessive ft_strdel instruction in lm_parser
This commit is contained in:
Tanguy MAZE
2019-04-29 13:08:08 +02:00
parent a51c8ad81d
commit b22a1a5af7
3 changed files with 6 additions and 12 deletions

View File

@@ -6,7 +6,7 @@
/* By: mndhlovu <mndhlovu@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/20 15:24:51 by mndhlovu #+# #+# */
/* Updated: 2019/04/29 12:45:25 by mndhlovu ### ########.fr */
/* Updated: 2019/04/29 13:07:10 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -84,17 +84,10 @@ int lm_parser(t_syntax *synt
if ((add_line_map(ldata, raw)))
return (0);
if (!(lm_get_ant_(index, ldata, synt, raw)) && index == 0)
{
//ft_strdel(&raw);
return (0);
}
lm_locate_cd(index, synt, raw);
if (!(lm_get_vertices(index, synt, ldata, holder, raw)))
{
ft_strdel(&raw);
return (0);
}
ft_strdel(&raw);
index++;
}
ft_strdel(&raw);