aboutsummaryrefslogtreecommitdiff
path: root/src/common/libc
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-19 18:25:29 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-19 18:25:29 +0100
commit277b329c5609b8172ad0c142117edfa9a08279da (patch)
tree23dc957e64e5b67e61072516bea30d650ffcefdd /src/common/libc
parent408faed4df730384538aaa0e338ae8ea7abe400d (diff)
downloadkogata-277b329c5609b8172ad0c142117edfa9a08279da.tar.gz
kogata-277b329c5609b8172ad0c142117edfa9a08279da.zip
Implement basic syscalls...
Diffstat (limited to 'src/common/libc')
-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);