aboutsummaryrefslogtreecommitdiffstats
path: root/src/wchar/wcpncpy.c
diff options
context:
space:
mode:
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;
}