summaryrefslogtreecommitdiffstats
path: root/libft/src
diff options
context:
space:
mode:
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);
}