diff options
Diffstat (limited to 'src/common/libc')
-rw-r--r-- | src/common/libc/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |