diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-02-21 23:19:18 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-02-21 23:19:18 -0500 |
commit | 330fd96213da324f9164081df9a5226790d7c4ec (patch) | |
tree | 93e9698318f78fccffb326b67027c2aa5028bba7 /src/string/wmemmove.c | |
parent | 8224bdbbedc60a5d637d95ddd344501f667f0294 (diff) | |
download | musl-330fd96213da324f9164081df9a5226790d7c4ec.zip musl-330fd96213da324f9164081df9a5226790d7c4ec.tar.gz musl-330fd96213da324f9164081df9a5226790d7c4ec.tar.bz2 |
fix wrong return value from wmemmove on forward copies
Diffstat (limited to 'src/string/wmemmove.c')
-rw-r--r-- | src/string/wmemmove.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/string/wmemmove.c b/src/string/wmemmove.c index 89041c3..cde4fee 100644 --- 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 d0; } |