Skip to content

Commit

Permalink
EXECUTOR: Update command_table.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurSobreira committed Mar 18, 2024
1 parent c570840 commit aac02f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/executor/command_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: arsobrei <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit aac02f9

Please sign in to comment.