diff options
Diffstat (limited to 'src/string/strn/stpncpy.c')
-rw-r--r-- | src/string/strn/stpncpy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strn/stpncpy.c b/src/string/strn/stpncpy.c index 876eaf0..4290dab 100644 --- a/src/string/strn/stpncpy.c +++ b/src/string/strn/stpncpy.c @@ -40,7 +40,7 @@ char* stpncpy(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 + n; } |