From 11a3669569fc90d56fb4d8c06a03d8837c05e94a Mon Sep 17 00:00:00 2001 From: tomoron Date: Sat, 17 Feb 2024 00:09:40 +0100 Subject: [PATCH] exec + 1 --- srcs/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcs/exec.c b/srcs/exec.c index 0322fc6..77fb369 100755 --- a/srcs/exec.c +++ b/srcs/exec.c @@ -6,7 +6,7 @@ /* By: marde-vr +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/02/07 14:12:49 by tomoron #+# #+# */ -/* Updated: 2024/02/16 22:22:37 by tomoron ### ########.fr */ +/* Updated: 2024/02/17 00:08:02 by tomoron ### ########.fr */ /* */ /* ************************************************************************** */ @@ -143,7 +143,7 @@ void exec_command(t_cmd *parsed_cmd, t_env *env) return ; cur_cmd = parsed_cmd; args_count = get_args_count(parsed_cmd); - cmd_args = calloc(args_count, sizeof(char *)); + cmd_args = calloc(args_count + 1, sizeof(char *)); if (!cmd_args) ft_exit(parsed_cmd, env, 1); i = 0;