diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-26 20:07:03 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-26 20:07:03 +0200 |
commit | 2cc6f50e5b04b903ca97d8a5479c95ca72b52547 (patch) | |
tree | b6b6616a1dc0425aa167eeda90dbe0f040183a50 /src/ft_u_vars.c | |
parent | Got special variables running (diff) | |
download | 42-minishell-2cc6f50e5b04b903ca97d8a5479c95ca72b52547.tar.gz 42-minishell-2cc6f50e5b04b903ca97d8a5479c95ca72b52547.tar.bz2 42-minishell-2cc6f50e5b04b903ca97d8a5479c95ca72b52547.tar.xz 42-minishell-2cc6f50e5b04b903ca97d8a5479c95ca72b52547.tar.zst 42-minishell-2cc6f50e5b04b903ca97d8a5479c95ca72b52547.zip |
substsubtsubst
Diffstat (limited to '')
-rw-r--r-- | src/ft_u_vars.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_u_vars.c b/src/ft_u_vars.c index 80288e6..619e83d 100644 --- a/src/ft_u_vars.c +++ b/src/ft_u_vars.c @@ -35,7 +35,8 @@ static char } ft_memcpy((char*)rvarname, (const char*)varname + 1, ft_strlen(varname + 1)); - ft_strlcpy(rvarname + ft_strlen(varname + 1), "=", 2); + *(rvarname + ft_strlen(varname + 1)) = '='; + *(rvarname + ft_strlen(varname + 1) + 1) = '\0'; return (rvarname); } |