This commit is contained in:
Tanguy MAZE
2019-03-23 17:21:58 +01:00
3 changed files with 6 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/19 15:14:49 by tmaze #+# #+# */
/* Updated: 2019/03/19 15:18:45 by tmaze ### ########.fr */
/* Updated: 2019/03/20 17:00:52 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -16,7 +16,7 @@ int ft_putendl2(char const *s)
{
char *str;
if (s != NULL && (str = ft_strnew(ft_strlen(s))) != NULL)
if (s != NULL && (str = ft_strnew(ft_strlen(s) + 1)) != NULL)
{
ft_strcpy(str, s);
ft_strcat(str, "\n");