From c6d343fccb84e9fc89dfc75b3f35a352e97b14a4 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 6 Aug 2019 18:19:11 +0200 Subject: details, print_memory start - copied c09 correct ft_split to c07 - strdup parenthesis in malloc - strlcat copied from tested libft --- c07/ex05/ft_split.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'c07/ex05') diff --git a/c07/ex05/ft_split.c b/c07/ex05/ft_split.c index 3ff2e43..a11477f 100644 --- a/c07/ex05/ft_split.c +++ b/c07/ex05/ft_split.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/08 15:58:03 by cacharle #+# #+# */ -/* Updated: 2019/07/13 08:15:31 by cacharle ### ########.fr */ +/* Updated: 2019/07/16 09:18:23 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -62,7 +62,8 @@ char **heck(char *str, char *charset, char *tmp, int i) while (!in_charset(*str, charset) && *str) tmp[i++] = *str++; tmp[i] = '\0'; - strs[j++] = tmp; + if (i != 0) + strs[j++] = tmp; } strs[j] = 0; return (strs); -- cgit