cette fois c resolu
This commit is contained in:
@@ -93,8 +93,16 @@ int free_lst(t_gnlist **lst, int ret)
|
||||
} // ft_putnbr(tmp->lfd);ft_putstr("-(");ft_putnbr(tmp->next->lfd);ft_putstr("))");
|
||||
tmp->next = (*lst)->next; // ft_putstr("->(");ft_putnbr(tmp->lfd);ft_putstr("-");ft_putnbr(tmp->next->lfd);ft_putstr(")");
|
||||
free((*lst)->str);
|
||||
free(*lst);
|
||||
*lst = (*lst == tmp) ? NULL : tmp; // tmp2=tmp;ft_putstr("(");while(tmp2->next!=tmp){ft_putnbr(tmp2->lfd);ft_putstr("-");tmp2=tmp2->next;}ft_putnbr(tmp2->lfd);ft_putstr("-(");ft_putnbr(tmp2->next->lfd);ft_putstr("))");
|
||||
if (*lst == (*lst)->next)
|
||||
{
|
||||
free(*lst);
|
||||
*lst = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
free(*lst);
|
||||
*lst = tmp;
|
||||
} // tmp2=tmp;ft_putstr("(");while(tmp2->next!=tmp){ft_putnbr(tmp2->lfd);ft_putstr("-");tmp2=tmp2->next;}ft_putnbr(tmp2->lfd);ft_putstr("-(");ft_putnbr(tmp2->next->lfd);ft_putstr("))");
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user