debug ft_lst2add
This commit is contained in:
parent
adcb7c4c67
commit
b6a776379c
@ -6,7 +6,7 @@
|
|||||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2018/09/30 17:07:48 by tmaze #+# #+# */
|
/* Created: 2018/09/30 17:07:48 by tmaze #+# #+# */
|
||||||
/* Updated: 2018/09/30 17:48:30 by tmaze ### ########.fr */
|
/* Updated: 2018/09/30 18:10:26 by tmaze ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -14,8 +14,12 @@
|
|||||||
|
|
||||||
void ft_lst2add(t_list2 **alst, t_list2 *new)
|
void ft_lst2add(t_list2 **alst, t_list2 *new)
|
||||||
{
|
{
|
||||||
new->next = (*alst)->next;
|
|
||||||
new->prev = *alst;
|
new->prev = *alst;
|
||||||
|
if (*alst != NULL)
|
||||||
|
{
|
||||||
|
new->next = (*alst)->next;
|
||||||
|
if (new->next != NULL)
|
||||||
new->next->prev = new;
|
new->next->prev = new;
|
||||||
(*alst)->next = new;
|
(*alst)->next = new;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user