Files
cub3d/lib/libft/ft_lstadd_back_bonus.c
Angel Ortigosa Perez a4c1881930 Libft and ftprintf added
2025-11-15 10:31:47 +01:00

30 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/22 20:27:06 by aortigos #+# #+# */
/* Updated: 2023/10/22 20:37:18 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_back(t_list **lst, t_list *new)
{
t_list *i;
if (lst)
{
if (*lst)
{
i = ft_lstlast(*lst);
i->next = new;
}
else
*lst = new;
}
}