From 706c69d40fcc46e7d7f170dab932d3c7fcc7c34e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 13 Feb 2015 22:44:10 +0100 Subject: Begin implementation of syscalls. --- src/common/libc/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/libc') diff --git a/src/common/libc/string.c b/src/common/libc/string.c index f6c27b4..7aa155d 100644 --- a/src/common/libc/string.c +++ b/src/common/libc/string.c @@ -33,7 +33,7 @@ char *strncpy(char *dest, const char *src, size_t n) { size_t x = strlen(src + 1); if (n < x) x = n; memcpy(dest, src, x); - if (n > x) memset(dest + n, 0, n - x); + if (n > x) memset(dest + x, 0, n - x); return (char*)dest; } -- cgit v1.2.3