diff options
Diffstat (limited to 'ft_strmapi.c')
| -rw-r--r-- | ft_strmapi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ft_strmapi.c b/ft_strmapi.c index 2ded74e..7784980 100644 --- a/ft_strmapi.c +++ b/ft_strmapi.c @@ -19,6 +19,8 @@ char *ft_strmapi(char *s, char (*f)(unsigned int, char)) size_t len; char *mapped; + if (s == NULL || f == NULL) + return (NULL); len = ft_strlen(s); if ((mapped = (char*)malloc(sizeof(char) * (len + 1))) == NULL) return (NULL); |
