diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-04 14:44:55 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-04 14:44:55 +0200 |
commit | 647a984ac6b6e2629ad16d3892ad3c231e8e277a (patch) | |
tree | ea96eb4f73efa946f100f77538ad1149a8f2de05 /src/u_vars_next.c | |
parent | New libft function strclen, bug fix (diff) | |
download | 42-minishell-647a984ac6b6e2629ad16d3892ad3c231e8e277a.tar.gz 42-minishell-647a984ac6b6e2629ad16d3892ad3c231e8e277a.tar.bz2 42-minishell-647a984ac6b6e2629ad16d3892ad3c231e8e277a.tar.xz 42-minishell-647a984ac6b6e2629ad16d3892ad3c231e8e277a.tar.zst 42-minishell-647a984ac6b6e2629ad16d3892ad3c231e8e277a.zip |
Huge bug fix
Diffstat (limited to '')
-rw-r--r-- | src/u_vars_next.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/u_vars_next.c b/src/u_vars_next.c index 5660449..820bbe1 100644 --- a/src/u_vars_next.c +++ b/src/u_vars_next.c @@ -28,7 +28,7 @@ static int64_t env_ptr = msh->envp; i = 0; while (*env_ptr && - ft_strncmp(*env_ptr, varname, ft_strlen(varname)) != 0) + ft_strncmp(varname, *env_ptr, ft_strclen(*env_ptr, '=')) != 0) { env_ptr++; i++; @@ -47,7 +47,7 @@ static t_bool ptr = msh->vars; while (ptr && - ft_strncmp(varname, ptr->name, ft_strlen(varname)) != 0) + ft_strncmp(varname, ptr->name, ft_strlen(varname) + 1) != 0) { ptr = ptr->next; } |