From c6d343fccb84e9fc89dfc75b3f35a352e97b14a4 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 6 Aug 2019 18:19:11 +0200 Subject: details, print_memory start - copied c09 correct ft_split to c07 - strdup parenthesis in malloc - strlcat copied from tested libft --- c07/ex00/ft_strdup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c07/ex00') diff --git a/c07/ex00/ft_strdup.c b/c07/ex00/ft_strdup.c index 754f317..4cf3b3a 100644 --- a/c07/ex00/ft_strdup.c +++ b/c07/ex00/ft_strdup.c @@ -28,7 +28,7 @@ char *ft_strdup(char *src) int i; char *dup_ptr; - dup_ptr = (char*)malloc(sizeof(char) * ft_strlen(src) + 1); + dup_ptr = (char*)malloc(sizeof(char) * (ft_strlen(src) + 1)); if (dup_ptr == NULL) { errno = ENOMEM; -- cgit