diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-12 15:57:51 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-12 15:57:51 +0200 |
commit | 81900e8ff106bbd9602f6589fc54e4530f5cc3dd (patch) | |
tree | b71cb48ffdc971ebb1299215aa19c19e66a0e6ab /src/p_lblock_next.c | |
parent | Aliases work, fucker (diff) | |
download | 42-minishell-81900e8ff106bbd9602f6589fc54e4530f5cc3dd.tar.gz 42-minishell-81900e8ff106bbd9602f6589fc54e4530f5cc3dd.tar.bz2 42-minishell-81900e8ff106bbd9602f6589fc54e4530f5cc3dd.tar.xz 42-minishell-81900e8ff106bbd9602f6589fc54e4530f5cc3dd.tar.zst 42-minishell-81900e8ff106bbd9602f6589fc54e4530f5cc3dd.zip |
Fix
Diffstat (limited to '')
-rw-r--r-- | src/p_lblock_next.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p_lblock_next.c b/src/p_lblock_next.c index 707acc0..3fa0ea5 100644 --- a/src/p_lblock_next.c +++ b/src/p_lblock_next.c @@ -62,9 +62,9 @@ static void ft_strlcpy(tmp, ptr + i, varlen + 1 - i); u_get_var_value(varval, tmp, ARG_MAX, msh); p_double_them_bs(varval); - (void)ft_memmove(ptr + (i + ft_strlen(tmp)), + ft_strlcpy(ptr + (i + ft_strlen(varval)), ptr + varlen, - (ft_strlen(ptr + varlen) + 1) * sizeof(char)); + ft_strlen(ptr + varlen) + 1); (void)ft_memmove(word + i, varval, ft_strlen(varval) * sizeof(char)); *(p) = word + (i + ft_strlen(varval) - 1); } |