summaryrefslogtreecommitdiffstats
path: root/libft/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-26 21:05:11 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-26 21:05:11 +0200
commit38bbcb10980c5ad1692aadd574e911e9c551cae9 (patch)
tree8e9ea8db6c558429d33323e7f9258799fcf15a6c /libft/src
parentsearching (diff)
download42-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 '')
-rw-r--r--libft/src/ft_strsubst.c2
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);
}