aboutsummaryrefslogtreecommitdiffstats
path: root/src/wchar/wcpncpy.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-18 07:34:33 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-18 07:34:33 +0100
commitc487f0da07799446ce468ee2e9dd2ac8d24f9a8a (patch)
tree1084f90b55ea1d1ea07507e288210d26e1c6c0f8 /src/wchar/wcpncpy.c
parentimplement additional string.h and wchar.h functions (diff)
downloadslibc-c487f0da07799446ce468ee2e9dd2ac8d24f9a8a.tar.gz
slibc-c487f0da07799446ce468ee2e9dd2ac8d24f9a8a.tar.bz2
slibc-c487f0da07799446ce468ee2e9dd2ac8d24f9a8a.tar.xz
fix errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/wchar/wcpncpy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wchar/wcpncpy.c b/src/wchar/wcpncpy.c
index fc5d68b..e291d35 100644
--- a/src/wchar/wcpncpy.c
+++ b/src/wchar/wcpncpy.c
@@ -40,7 +40,7 @@ wchar_t* wcpncpy(wchar_t* restrict whither, const wchar_t* restrict whence, size
{
size_t n = wcsnlen(whence, maxlen);
wmemcpy(whither, whence, n);
- wmemset(whither, 0, maxlen - n);
+ wmemset(whither + n, 0, maxlen - n);
return whither + n;
}