diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-26 21:05:11 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-26 21:05:11 +0200 |
commit | 38bbcb10980c5ad1692aadd574e911e9c551cae9 (patch) | |
tree | 8e9ea8db6c558429d33323e7f9258799fcf15a6c /libft/src | |
parent | searching (diff) | |
download | 42-minishell-38bbcb10980c5ad1692aadd574e911e9c551cae9.tar.gz 42-minishell-38bbcb10980c5ad1692aadd574e911e9c551cae9.tar.bz2 42-minishell-38bbcb10980c5ad1692aadd574e911e9c551cae9.tar.xz 42-minishell-38bbcb10980c5ad1692aadd574e911e9c551cae9.tar.zst 42-minishell-38bbcb10980c5ad1692aadd574e911e9c551cae9.zip |
Better subst
Diffstat (limited to 'libft/src')
-rw-r--r-- | libft/src/ft_strsubst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libft/src/ft_strsubst.c b/libft/src/ft_strsubst.c index dd89917..57e0ac8 100644 --- a/libft/src/ft_strsubst.c +++ b/libft/src/ft_strsubst.c @@ -30,7 +30,7 @@ char ft_memcpy(nstr + (ptr - str + ft_strlen(subst)), str + (ptr - str + ft_strlen(pattern)), ft_strlen(str + (ptr - str + ft_strlen(pattern)))); - nstr[nlen + 1] = '\0'; + nstr[nlen] = '\0'; ft_memdel((void*)&str); return (nstr); } |