Browse Source

[fix] libft: strsub: fix return value type.

Moul 4 years ago
parent
commit
b8c1c97136
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/ft_strsub.c

+ 2 - 2
src/ft_strsub.c

@@ -6,7 +6,7 @@
 /*   By: mazimi <mazimi@student.42.fr>              +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2014/12/09 13:45:03 by mazimi            #+#    #+#             */
-/*   Updated: 2015/09/16 16:06:23 by mazimi           ###   ########.fr       */
+/*   Updated: 2016/11/29 16:47:48 by mazimi           ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -23,7 +23,7 @@ char	*ft_strsub(char const *s, unsigned int start, size_t len)
 		return (NULL);
 	res = ft_strnew(len);
 	if (res == NULL)
-		return (0);
+		return (NULL);
 	i = -1;
 	while (++i < len)
 		res[i] = s[start++];