strappend fix

This commit is contained in:
Jack Halford 2016-12-13 17:59:26 +01:00
parent ebfef066fc
commit 109bce411c
2 changed files with 5 additions and 3 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

View file

@ -6,17 +6,19 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
}