diff options
Diffstat (limited to 'zap/source/any')
-rw-r--r-- | zap/source/any/mem/cp.c | 3 | ||||
-rw-r--r-- | zap/source/any/str/strlen.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/zap/source/any/mem/cp.c b/zap/source/any/mem/cp.c index 9752721..12c6bfd 100644 --- a/zap/source/any/mem/cp.c +++ b/zap/source/any/mem/cp.c @@ -6,9 +6,10 @@ #include <zap/mem.h> -void zap_cp(void * const zap_priv_restr voiddest,void const * const zap_priv_restr voidsrc,zap_sz const num) { +void * zap_cp(void * const zap_priv_restr voiddest,void const * const zap_priv_restr voidsrc,zap_sz const num) { unsigned char * dest = voiddest; unsigned char const * src = voidsrc; unsigned char * const stop = dest + num; while (dest != stop) *dest++ = *src++; + return dest; } diff --git a/zap/source/any/str/strlen.c b/zap/source/any/str/strlen.c index e6e9019..e763701 100644 --- a/zap/source/any/str/strlen.c +++ b/zap/source/any/str/strlen.c @@ -8,6 +8,6 @@ zap_sz zap_strlen(char const * str) { char const * const start = str; - while (*str++); + while (*str++ != '\x0'); return (zap_sz)(str - start) - 0x1u; } |