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