From 463d8fb1081e69918fdc63f469f675eba0188306 Mon Sep 17 00:00:00 2001 From: kinou-p Date: Sun, 13 Dec 2020 22:12:32 +0100 Subject: [PATCH] push --- ft_split.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ft_split.c b/ft_split.c index fc15bbd..afcbdca 100644 --- a/ft_split.c +++ b/ft_split.c @@ -6,7 +6,7 @@ /* By: apommier +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/12/07 00:54:12 by apommier #+# #+# */ -/* Updated: 2020/12/13 22:07:53 by apommier ### ########.fr */ +/* Updated: 2020/12/13 22:12:26 by apommier ### ########.fr */ /* */ /* ************************************************************************** */ @@ -63,10 +63,10 @@ char **ft_split(char const *s, char c) return (0); while (s[i]) { - while (s[i] == c && s[i]) + while (s[i] != c && s[i]) i++; j++; - while (s[i] != c && s[i]) + while (s[i] == c && s[i]) i++; } if (!(dest = (char**)malloc(sizeof(char*) * j))))