summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/ntux_nolibc_impl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/internal/ntux_nolibc_impl.c b/src/internal/ntux_nolibc_impl.c
index b543582..e20d046 100644
--- a/src/internal/ntux_nolibc_impl.c
+++ b/src/internal/ntux_nolibc_impl.c
@@ -18,9 +18,13 @@ void * ntux_memset(void * ch, int c, size_t n)
char * ntux_strcpy(char * dst, const char * src)
{
- return __xfi_memcpy(
- dst,src,
- __xfi_strlen(src));
+ size_t srclen;
+
+ srclen = __xfi_strlen(src);
+ __xfi_memcpy(dst,src,srclen);
+ dst[srclen] = '\0';
+
+ return dst;
}
size_t ntux_strlen(const char * ch)