diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 22:44:10 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 22:44:10 +0100 |
commit | 706c69d40fcc46e7d7f170dab932d3c7fcc7c34e (patch) | |
tree | 5248ff8712eced5bc4fdd76e9399654ce5224a37 /src/common/libc | |
parent | 47e6cd42f0744f6c04b8347093f6549339a856c9 (diff) | |
download | kogata-706c69d40fcc46e7d7f170dab932d3c7fcc7c34e.tar.gz kogata-706c69d40fcc46e7d7f170dab932d3c7fcc7c34e.zip |
Begin implementation of syscalls.
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; } |