summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2010-03-18 02:00:23 +0000
committerbernard.xiong <[email protected]>2010-03-18 02:00:23 +0000
commitc870bdb628e6424e3faade22790009b53767cf7e (patch)
tree34028e9e3a19c6f3f1755b9ffdf17724f0f5f0a6 /libc
parent3cc54e91bf24d17d92d386fc06b938938e84732f (diff)
revert gary.li changes on strlcpy function.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@503 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libc')
-rw-r--r--libc/minilibc/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/minilibc/string.c b/libc/minilibc/string.c
index e7fc6d4009..2de4f20790 100644
--- a/libc/minilibc/string.c
+++ b/libc/minilibc/string.c
@@ -38,7 +38,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz)
register size_t n = siz;
/* Copy as many bytes as will fit */
- if (n != 0)
+ if (n != 0 && --n != 0)
{
do
{