diff --git a/src/exec_command.c b/src/exec_command.c index d431226..ee7823f 100644 --- a/src/exec_command.c +++ b/src/exec_command.c @@ -6,7 +6,7 @@ /* By: jschaft +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/24 13:48:00 by jschaft #+# #+# */ -/* Updated: 2024/05/13 10:17:48 by jschaft ### ########.fr */ +/* Updated: 2024/05/15 12:04:07 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ @@ -77,7 +77,7 @@ int execute_command(t_memclass mc, t_command command, char *const envp[]) i = 0; while (command.calls[i].program != NULL) i++; - pipes = malloc(sizeof(t_pipes) * i + 1); + pipes = malloc(sizeof(t_pipes) * (i + 1)); i = 0; while (command.calls[i].program != NULL) {