This commit is contained in:
kinou-p 2020-12-13 22:08:00 +01:00
parent 42dc8ff0a2
commit 7929de9c89

View File

@ -6,7 +6,7 @@
/* By: apommier <alexpomms@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/12/07 00:54:12 by apommier #+# #+# */
/* Updated: 2020/12/13 22:04:54 by apommier ### ########.fr */
/* Updated: 2020/12/13 22:07:53 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
@ -69,7 +69,7 @@ char **ft_split(char const *s, char c)
while (s[i] != c && s[i])
i++;
}
if (!(dest = (char**)malloc(sizeof(char*) * (j + 1))))
if (!(dest = (char**)malloc(sizeof(char*) * j))))
return (0);
dest[j] = 0;
call((char*)s, c, dest, j);