diff options
| author | gary.li.wenchao.4 <[email protected]> | 2010-03-17 10:35:43 +0000 |
|---|---|---|
| committer | gary.li.wenchao.4 <[email protected]> | 2010-03-17 10:35:43 +0000 |
| commit | 3cc54e91bf24d17d92d386fc06b938938e84732f (patch) | |
| tree | cb12258b9910e669b158fa6d3fcbf0deb143b5f1 /libc | |
| parent | 2d54fcc40581c348959e50a853ef7d4c0478974f (diff) | |
fixed strlcpy()
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@502 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 2de4f20790..e7fc6d4009 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 && --n != 0) + if (n != 0) { do { |
