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 7aa155d..dfc93e6 100644 --- a/src/common/libc/string.c +++ b/src/common/libc/string.c @@ -30,7 +30,7 @@ char *strcpy(char *dest, const char *src) { } char *strncpy(char *dest, const char *src, size_t n) { - size_t x = strlen(src + 1); + size_t x = strlen(src); if (n < x) x = n; memcpy(dest, src, x); if (n > x) memset(dest + x, 0, n - x); |