This commit is contained in:
Loic Deridder
2025-01-21 13:42:32 +01:00
parent 563349c2f8
commit 9dbc3f75e8
8 changed files with 149 additions and 79 deletions

7
srcs/env/var.c vendored
View File

@@ -100,6 +100,13 @@ int get_var_index(char *key, t_data *data)
free_null_ptr(new_key);
return (i);
}
else if (ft_strncmp(data->env[i], key, ft_strlen(key)) == 0
&& (ft_strchr(data->env[i], '=') == NULL &&
(ft_strlen(data->env[i]) == ft_strlen(key))))
{
free_null_ptr(new_key);
return (i);
}
i++;
}
free_null_ptr(new_key);