clean up code for when an error occurs
testing with all maps is what is left
This commit is contained in:
@@ -41,7 +41,7 @@ static int lem_in(t_syntax *synt, t_holder *holder,
|
||||
{
|
||||
if (!(lm_parser(synt, lmdata, holder)))
|
||||
return (0);
|
||||
if (!(lm_verify_cmd(synt, holder, data)))
|
||||
if (!(lm_verify_cmd(synt, holder, lmdata)))
|
||||
return (0);
|
||||
if (!lst_indinit(lmdata))
|
||||
return (0);
|
||||
|
@@ -31,7 +31,7 @@ void lm_clear_unv(t_holder *holder)
|
||||
t_temp *flush;
|
||||
|
||||
data = holder->data;
|
||||
while (tmp)
|
||||
while (data)
|
||||
{
|
||||
flush = data;
|
||||
data = data->next;
|
||||
@@ -48,5 +48,6 @@ int lm_verify_cmd(t_syntax *synt, t_holder *holder, t_lmdata *data)
|
||||
&& synt->nb_state && (holder->count > 0)
|
||||
&& (data->nb_nodes > 0))
|
||||
return (1);
|
||||
lm_clear_unv(holder);
|
||||
return (0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user