diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-11-18 07:34:33 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-11-18 07:34:33 +0100 |
commit | c487f0da07799446ce468ee2e9dd2ac8d24f9a8a (patch) | |
tree | 1084f90b55ea1d1ea07507e288210d26e1c6c0f8 /src/string/strn/strncpy.c | |
parent | implement additional string.h and wchar.h functions (diff) | |
download | slibc-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 'src/string/strn/strncpy.c')
-rw-r--r-- | src/string/strn/strncpy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strn/strncpy.c b/src/string/strn/strncpy.c index f3eba84..3a1e66b 100644 --- a/src/string/strn/strncpy.c +++ b/src/string/strn/strncpy.c @@ -37,7 +37,7 @@ char* strncpy(char* restrict whither, const char* restrict whence, size_t maxlen { size_t n = strnlen(whence, maxlen); memcpy(whither, whence, n); - memset(whither, 0, maxlen - n); + memset(whither + n, 0, maxlen - n); return whither; } |