提交 330fd962 编写于 作者: R Rich Felker

fix wrong return value from wmemmove on forward copies

上级 8224bdbb
......@@ -3,9 +3,10 @@
wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n)
{
wchar_t *d0 = d;
if ((size_t)(d-s) < n)
while (n--) d[n] = s[n];
else
while (n--) *d++ = *s++;
return d;
return d0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册