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); }