From aac02f99bbe3e6e874d97d482da0306354c6f6f8 Mon Sep 17 00:00:00 2001 From: Arthur Sobreira Date: Mon, 18 Mar 2024 09:48:16 -0300 Subject: [PATCH] EXECUTOR: Update command_table.c --- src/executor/command_table.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/executor/command_table.c b/src/executor/command_table.c index bcffced..c5b97f4 100644 --- a/src/executor/command_table.c +++ b/src/executor/command_table.c @@ -6,7 +6,7 @@ /* By: arsobrei +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/02/15 18:03:22 by arsobrei #+# #+# */ -/* Updated: 2024/02/29 18:26:20 by arsobrei ### ########.fr */ +/* Updated: 2024/03/09 16:38:00 by arsobrei ### ########.fr */ /* */ /* ************************************************************************** */ @@ -125,6 +125,8 @@ char **get_envp(t_var *env_vars) envp = malloc(sizeof(char *) * (get_core()->env_vars_size + 1)); while (current_var != NULL) { + if (current_var->key == NULL) + current_var->key = ft_strdup(""); key = ft_strjoin(current_var->key, "="); if (current_var->value) envp[index] = ft_strjoin(key, current_var->value);