提交 c870bdb6 编写于 作者: B bernard.xiong

revert gary.li changes on strlcpy function.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@503 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 3cc54e91
......@@ -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
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册