correction de split pour retour valeur de null

This commit is contained in:
Hugo LAMY
2019-12-12 22:27:56 +01:00
parent 55b63ed47f
commit cf4203809f
3 changed files with 35 additions and 12 deletions

View File

@@ -20,9 +20,7 @@ void print_ft_split(char *str, char c)
printf("split : [%s] [%c] -> ", str, c);
tab = ft_split(str, c);
// while (*tab != NULL) sans verifier que tab est malloc
// printf("[%s]", *(tab++));
while (tab && *tab != NULL)
while (*tab != NULL)
printf("[%s]", *(tab++));
printf("\n");
}