From 109bce411c9838319fbe4e14d7161640bfb4e673 Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Tue, 13 Dec 2016 17:59:26 +0100 Subject: [PATCH] strappend fix --- libft/includes/libft.h | 2 +- libft/src/str/ft_strappend.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libft/includes/libft.h b/libft/includes/libft.h index 8eb991cc..75873159 100644 --- a/libft/includes/libft.h +++ b/libft/includes/libft.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/07 13:49:04 by jhalford #+# #+# */ -/* Updated: 2016/12/13 12:18:54 by jhalford ### ########.fr */ +/* Updated: 2016/12/13 17:22:16 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/libft/src/str/ft_strappend.c b/libft/src/str/ft_strappend.c index 761ca683..2330a8c6 100644 --- a/libft/src/str/ft_strappend.c +++ b/libft/src/str/ft_strappend.c @@ -6,17 +6,19 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 12:16:31 by jhalford #+# #+# */ -/* Updated: 2016/12/13 12:18:41 by jhalford ### ########.fr */ +/* Updated: 2016/12/13 16:57:31 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ +#include "libft.h" + int ft_strappend(char **dst, char *src) { char *out; if (!(out = ft_strjoin(*dst, src))) return (-1); - ft_strdel(*dst); + ft_strdel(dst); *dst = out; return (0); }