diff options
-rw-r--r-- | src/p_lblock_next.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/p_lblock_next.c b/src/p_lblock_next.c index e342f4a..e5e46dc 100644 --- a/src/p_lblock_next.c +++ b/src/p_lblock_next.c @@ -61,7 +61,7 @@ static char ft_strlcpy(tmp, ptr + i, varlen + 1 - i); u_get_var_value(varval, tmp, ARG_MAX, msh); p_double_them_bs(varval); - ft_strlcpy(tmp, ptr + varlen, varlen + 1); + ft_strlcpy(tmp, ptr + varlen, ft_strlen(ptr + varlen) + 1); if ((word = ft_nrealloc(word, i, i + ft_strlen(varval) + ft_strlen(tmp) + 1)) == NULL) return (NULL); @@ -69,6 +69,7 @@ static char ft_strlcpy(word + (i + ft_strlen(varval)), tmp, ft_strlen(tmp) + 1); count = 0; *(p) = word + (i + ft_strlen(varval) - 1); + ft_printf("[%s]\n", word); return (word); } |