diff options
| author | bernard.xiong <[email protected]> | 2010-03-18 02:00:23 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-03-18 02:00:23 +0000 |
| commit | c870bdb628e6424e3faade22790009b53767cf7e (patch) | |
| tree | 34028e9e3a19c6f3f1755b9ffdf17724f0f5f0a6 /libc | |
| parent | 3cc54e91bf24d17d92d386fc06b938938e84732f (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.c | 2 |
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 { |
