diff options
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; } |