diff options
Diffstat (limited to 'src/string/strn/strstrnmove.c')
-rw-r--r-- | src/string/strn/strstrnmove.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strn/strstrnmove.c b/src/string/strn/strstrnmove.c index 9bec614..d1c63f9 100644 --- a/src/string/strn/strstrnmove.c +++ b/src/string/strn/strstrnmove.c @@ -48,7 +48,7 @@ char* strstrnmove(char* whither, const char* whence, const char* restrict str, s size_t n = stop == NULL ? strnlen(whence, maxlen) : (size_t)(stop - whence); char* r = stop == NULL ? NULL : (whither + n); memmove(whither, whence, n); - memset(whither, 0, maxlen - n); + memset(whither + n, 0, maxlen - n); return r; } |