version test pour part2

This commit is contained in:
Hugo LAMY
2019-12-12 20:51:01 +01:00
parent 9396471afe
commit 55b63ed47f
2 changed files with 43 additions and 5 deletions

View File

@@ -95,7 +95,13 @@ char **ft_split(char const *s, char c)
int len;
w = 0;
if (!s || !(array = (char **)malloc(sizeof(char *) * 1000 * (count(s, c) + 1))))
// if (!s)
// {
// array = malloc(sizeof(char*));
// array[0] = 0;
// return (array);
// }
if (!s || !(array = (char **)malloc(sizeof(char *) * (count(s, c) + 1))))
return (NULL);
while (*s != '\0')
{