summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/p_lcom_next.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p_lcom_next.c b/src/p_lcom_next.c
index 7bc306e..7ae0331 100644
--- a/src/p_lcom_next.c
+++ b/src/p_lcom_next.c
@@ -65,11 +65,11 @@ static char
varlen += 1;
ft_strlcpy(tmp, ptr + i, varlen + 1 - i);
u_get_var_value(varval, tmp, 4096, msh);
- ft_strlcpy(tmp, ptr + varlen + 1, varlen);
+ ft_strlcpy(tmp, ptr + varlen, varlen);
word = ft_nrealloc(word, i, i + ft_strlen(varval) + ft_strlen(tmp) + 1);
ft_strlcpy(word + i, varval, ft_strlen(varval) + 1);
- ft_printf("[%s]\n", tmp);
ft_strlcpy(word + i + ft_strlen(varval), tmp, ft_strlen(tmp) + 1);
+ ft_printf("[%s]\n", word);
exit(0);
return (word);
}