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/strstrncpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string/strn/strstrncpy.c') 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; } -- cgit v1.2.3-70-g09d2