diff options
Diffstat (limited to '')
-rw-r--r-- | src/string/strn/strstrncpy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strn/strstrncpy.c b/src/string/strn/strstrncpy.c index 0beb8ec..43b58fe 100644 --- a/src/string/strn/strstrncpy.c +++ b/src/string/strn/strstrncpy.c @@ -49,7 +49,7 @@ char* strstrncpy(char* restrict whither, const char* restrict whence, 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; } |