From c487f0da07799446ce468ee2e9dd2ac8d24f9a8a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 18 Nov 2015 07:34:33 +0100 Subject: fix errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/string/strn/strcnmove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string/strn/strcnmove.c') diff --git a/src/string/strn/strcnmove.c b/src/string/strn/strcnmove.c index f418e92..5fbdf19 100644 --- a/src/string/strn/strcnmove.c +++ b/src/string/strn/strcnmove.c @@ -48,7 +48,7 @@ char* strcnmove(char* whither, const char* whence, int c, size_t maxlen) 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; } -- cgit v1.2.3-70-g09d2