From fb25764350ba344aa7602e09f12f98c60e97ca22 Mon Sep 17 00:00:00 2001 From: lalgarra Date: Thu, 9 Oct 2025 17:55:22 +0200 Subject: [PATCH] Working on ft_split() --- ft_split_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ft_split_test.c b/ft_split_test.c index a981705..e867a98 100644 --- a/ft_split_test.c +++ b/ft_split_test.c @@ -6,7 +6,7 @@ /* By: lalgarra +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/10/09 17:20:58 by lalgarra #+# #+# */ -/* Updated: 2025/10/09 17:35:12 by lalgarra ### ########.fr */ +/* Updated: 2025/10/09 17:53:43 by lalgarra ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,6 +31,7 @@ static void printres(char **res, int fd) { ft_putstr_fd1(res[idx], fd); ft_putstr_fd("], [", fd); + idx++; } ft_putstr_fd1(res[idx], fd); } @@ -41,7 +42,7 @@ static void freeres(char **res) idx = 0; while (res[idx] != NULL) - free(res[idx]); + free(res[idx++]); free(res); }