mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
revert gary.li changes on strlcpy function.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@503 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
1 parent
3cc54e91bf
commit
c870bdb628
1 file changed
+1
-1
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user