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/strcncpy.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/strcncpy.c')
-rw-r--r-- | src/string/strn/strcncpy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strn/strcncpy.c b/src/string/strn/strcncpy.c index 5036c7d..594e7df 100644 --- a/src/string/strn/strcncpy.c +++ b/src/string/strn/strcncpy.c @@ -48,7 +48,7 @@ char* strcncpy(char* restrict whither, const char* restrict whence, int c, size_ size_t n = stop == NULL ? strnlen(whence, maxlen) : (size_t)(stop - whence); char* r = stop == NULL ? NULL : (whither + n); memcpy(whither, whence, n); - memset(whither, 0, maxlen - n); + memset(whither + n, 0, maxlen - n); return r; } |