projects
/
Libft.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c87057b
)
Removed assigning to dest[n+1]. It should have been dest[n], but is redundant.
author
Lukas Jiriste
<ljiriste@student.42prague.com>
Wed, 27 Sep 2023 13:46:12 +0000
(15:46 +0200)
committer
Lukas Jiriste
<ljiriste@student.42prague.com>
Wed, 27 Sep 2023 13:46:12 +0000
(15:46 +0200)
ft_strndup.c
patch
|
blob
|
history
diff --git
a/ft_strndup.c
b/ft_strndup.c
index 66088030f072f7988275e7fe715c252bcfeb2b8b..cbca646cdf3c23be8fdea5d4545651e7d31364fb 100644
(file)
--- a/
ft_strndup.c
+++ b/
ft_strndup.c
@@
-6,7
+6,7
@@
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/24 09:18:49 by ljiriste #+# #+# */
-/* Updated: 2023/0
8/24 09:24:51
by ljiriste ### ########.fr */
+/* Updated: 2023/0
9/27 15:45:36
by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
@@
-25,6
+25,5
@@
char *ft_strndup(const char *s, size_t n)
if (dest == NULL)
return (dest);
ft_strlcpy(dest, s, n + 1);
- dest[n + 1] = '\0';
return (dest);
}