projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8224bdb
)
fix wrong return value from wmemmove on forward copies
author
Rich Felker
<dalias@aerifal.cx>
Fri, 22 Feb 2013 04:19:18 +0000
(23:19 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 22 Feb 2013 04:19:18 +0000
(23:19 -0500)
src/string/wmemmove.c
patch
|
blob
|
history
diff --git
a/src/string/wmemmove.c
b/src/string/wmemmove.c
index 89041c32ae28ad29847ed720a9b75944e85b7c80..cde4feec920d2c0f99d5b28578889bd8410abb27 100644
(file)
--- a/
src/string/wmemmove.c
+++ b/
src/string/wmemmove.c
@@
-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 d
0
;
}