summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-10-11 03:49:30 +0000
committerRoland McGrath <roland@gnu.org>1994-10-11 03:49:30 +0000
commit36a7d72126b16db29f165a94ef96b8aa50a112d1 (patch)
treefd83571139c7e54e5ac0c942e6760d880087258e
parentb76e5ac6585b07044d3f68bc84e83e18a26d9377 (diff)
(Copying and Concatenation): Note that when strncpy limits copying it does
not write a null terminator.
-rw-r--r--manual/string.texi3
1 files changed, 2 insertions, 1 deletions
diff --git a/manual/string.texi b/manual/string.texi
index 476e47e1a2..9169fa3590 100644
--- a/manual/string.texi
+++ b/manual/string.texi
@@ -265,7 +265,8 @@ This function is similar to @code{strcpy} but always copies exactly
@var{size} characters into @var{to}.
If the length of @var{from} is more than @var{size}, then @code{strncpy}
-copies just the first @var{size} characters.
+copies just the first @var{size} characters. Note that in this case
+there is no null terminator written into @var{to}.
If the length of @var{from} is less than @var{size}, then @code{strncpy}
copies all of @var{from}, followed by enough null characters to add up