aboutsummaryrefslogtreecommitdiff
path: root/src/common/libc/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/libc/string.c')
-rw-r--r--src/common/libc/string.c2
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);