mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2026-10-16 03:10:07 +02:00
「🔨」 fix: fixed some things.
This commit is contained in:
1 parent
bab3478015
commit
b55a715fcc
2 files changed
+7
-3
No files matched your search
@@ -6,7 +6,7 @@
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/25 16:56:34 by mmoussou #+# #+# */
|
||||
/* Updated: 2024/06/25 16:59:09 by mmoussou ### ########.fr */
|
||||
/* Updated: 2024/07/16 13:20:17 by mmoussou ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -16,6 +16,7 @@ void ft_env(t_env *env)
|
||||
{
|
||||
while (env)
|
||||
{
|
||||
if (env->content)
|
||||
printf("%s=%s\n", env->name, env->content);
|
||||
env = env->next;
|
||||
}
|
||||
|
||||
Vendored
+5
-2
@@ -6,7 +6,7 @@
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/22 14:42:52 by mmoussou #+# #+# */
|
||||
/* Updated: 2024/07/14 14:42:28 by mmoussou ### ########.fr */
|
||||
/* Updated: 2024/07/16 13:19:36 by mmoussou ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -93,6 +93,8 @@ char **env_get(t_env *env)
|
||||
ar[ft_envsize(env)] = NULL;
|
||||
i = 0;
|
||||
while (env)
|
||||
{
|
||||
if (env->content)
|
||||
{
|
||||
ar[i] = ft_calloc(1, ft_vstrlen(2, env->name, env->content) + 2);
|
||||
if (!ar[i])
|
||||
@@ -101,8 +103,9 @@ char **env_get(t_env *env)
|
||||
return (NULL);
|
||||
}
|
||||
fill_env_get(env->name, env->content, ar[i]);
|
||||
env = env->next;
|
||||
i++;
|
||||
}
|
||||
env = env->next;
|
||||
}
|
||||
return (ar);
|
||||
}
|
||||
Reference in new issue
Block a user