From 43f2100c5c5f5f7ccd93d56dde593f014606556e Mon Sep 17 00:00:00 2001 From: whaffman Date: Sun, 2 Mar 2025 22:34:18 +0100 Subject: [PATCH] use ft_split_safe --- src/builtin/builtin_export.c | 4 ++-- src/executor/executor_absolute_path.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/builtin/builtin_export.c b/src/builtin/builtin_export.c index a7013c8..d3f69d6 100644 --- a/src/builtin/builtin_export.c +++ b/src/builtin/builtin_export.c @@ -6,7 +6,7 @@ /* By: whaffman +#+ */ /* +#+ */ /* Created: 2025/02/20 11:32:53 by whaffman #+# #+# */ -/* Updated: 2025/03/02 22:09:36 by whaffman ######## odam.nl */ +/* Updated: 2025/03/02 22:22:19 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -21,7 +21,7 @@ int builtin_export(t_minishell *msh, t_command *cmd) i = 0; while (cmd->args[++i] != NULL) { - arr = ft_split(cmd->args[i], '='); + arr = ft_split_safe(msh, cmd->args[i], '='); if (arr[1] == NULL) { ft_free_arr_safe(msh, arr); diff --git a/src/executor/executor_absolute_path.c b/src/executor/executor_absolute_path.c index 1f3bc1c..86916b1 100644 --- a/src/executor/executor_absolute_path.c +++ b/src/executor/executor_absolute_path.c @@ -6,7 +6,7 @@ /* By: willem +#+ */ /* +#+ */ /* Created: 2025/02/08 17:00:24 by willem #+# #+# */ -/* Updated: 2025/03/01 14:24:46 by whaffman ######## odam.nl */ +/* Updated: 2025/03/02 22:20:30 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -52,7 +52,7 @@ char *executor_absolute_path(t_minishell *msh, char *cmd) path_env = environment_get(msh, "PATH"); if (!path_env) return (NULL); - path = ft_split(path_env->value, ':'); + path = ft_split_safe(msh, path_env->value, ':'); i = 0; while (path[i] != NULL) {