diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-06 22:02:47 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-06 22:02:47 +0200 |
commit | 1f867b196a83d0aeaf67d431a0fc5271e01a310e (patch) | |
tree | 4c4e38933074fc35798132906d8325b9042abe5c | |
parent | Stacked (diff) | |
download | 42-minishell-1f867b196a83d0aeaf67d431a0fc5271e01a310e.tar.gz 42-minishell-1f867b196a83d0aeaf67d431a0fc5271e01a310e.tar.bz2 42-minishell-1f867b196a83d0aeaf67d431a0fc5271e01a310e.tar.xz 42-minishell-1f867b196a83d0aeaf67d431a0fc5271e01a310e.tar.zst 42-minishell-1f867b196a83d0aeaf67d431a0fc5271e01a310e.zip |
Cool
Diffstat (limited to '')
-rw-r--r-- | src/p_lcom_next.c | 4 |
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); } |