strappend fix
This commit is contained in:
parent
7fd7d8c23c
commit
ed59cc7816
2 changed files with 5 additions and 3 deletions
|
|
@ -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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue