diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-19 18:25:29 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-19 18:25:29 +0100 |
commit | 277b329c5609b8172ad0c142117edfa9a08279da (patch) | |
tree | 23dc957e64e5b67e61072516bea30d650ffcefdd /src/common/libc/string.c | |
parent | 408faed4df730384538aaa0e338ae8ea7abe400d (diff) | |
download | kogata-277b329c5609b8172ad0c142117edfa9a08279da.tar.gz kogata-277b329c5609b8172ad0c142117edfa9a08279da.zip |
Implement basic syscalls...
Diffstat (limited to 'src/common/libc/string.c')
-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); |