calloc fix

This commit is contained in:
David Gailleton
2025-11-12 17:23:46 +01:00
parent 187e68e1aa
commit 53b2050d11
6 changed files with 13 additions and 12 deletions

View File

@@ -6,7 +6,7 @@
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/08 17:30:25 by dgaillet #+# #+# */
/* Updated: 2025/11/12 13:39:16 by dgaillet ### ########lyon.fr */
/* Updated: 2025/11/12 17:22:49 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -17,7 +17,7 @@ char *ft_strmapi(char const *s, char (*f)(unsigned int, char))
char *str;
unsigned int i;
if (!s)
if (!s || !f)
return (NULL);
i = 0;
str = malloc(sizeof(char) * (ft_strlen(s) + 1));