fix wrong return value from wmemmove on forward copies
This commit is contained in:
parent
8224bdbbed
commit
330fd96213
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue