diff --git a/libft/src/env/ft_getenv.c b/libft/src/env/ft_getenv.c index 65ff27a7..2b47fc5b 100644 --- a/libft/src/env/ft_getenv.c +++ b/libft/src/env/ft_getenv.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* ft_getenv.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: jhalford +#+ +:+ +#+ */ +/* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2016/11/10 14:30:00 by jhalford #+# #+# */ -/* Updated: 2016/11/16 11:24:52 by jhalford ### ########.fr */ +/* Created: 2016/12/01 12:15:45 by jhalford #+# #+# */ +/* Updated: 2016/12/01 12:29:25 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/libft/src/sstr/ft_sstrdup.c b/libft/src/sstr/ft_sstrdup.c index d79d1467..1ac68da3 100644 --- a/libft/src/sstr/ft_sstrdup.c +++ b/libft/src/sstr/ft_sstrdup.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/03 18:04:13 by jhalford #+# #+# */ -/* Updated: 2016/11/03 18:04:13 by jhalford ### ########.fr */ +/* Updated: 2016/12/01 12:29:27 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,5 +28,6 @@ char **ft_sstrdup(char **list) cpy[i++] = ft_strdup(*list); list++; } + cpy[i] = NULL; return (cpy); } diff --git a/libft/src/str/ft_strdup.c b/libft/src/str/ft_strdup.c index 9233b26e..dba3557f 100644 --- a/libft/src/str/ft_strdup.c +++ b/libft/src/str/ft_strdup.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/03 14:58:01 by jhalford #+# #+# */ -/* Updated: 2016/11/03 14:58:02 by jhalford ### ########.fr */ +/* Updated: 2016/12/01 12:27:28 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,7 +21,7 @@ char *ft_strdup(const char *s1) i = 0; size = ft_strlen(s1); dup = (char*)malloc(sizeof(*dup) * (size + 1)); - while (s1[i] != '\0') + while (s1[i]) { dup[i] = s1[i]; i++;