diff options
Diffstat (limited to 'src/libstddjb/stralloc_catb.c')
-rw-r--r-- | src/libstddjb/stralloc_catb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstddjb/stralloc_catb.c b/src/libstddjb/stralloc_catb.c index bb03405..f1bdc0a 100644 --- a/src/libstddjb/stralloc_catb.c +++ b/src/libstddjb/stralloc_catb.c @@ -1,12 +1,13 @@ /* ISC license. */ -#include <skalibs/bytestr.h> +#include <sys/types.h> +#include <string.h> #include <skalibs/stralloc.h> -int stralloc_catb (stralloc *sa, char const *s, unsigned int n) +int stralloc_catb (stralloc *sa, char const *s, size_t n) { if (!stralloc_readyplus(sa, n)) return 0 ; - byte_copy(sa->s + sa->len, n, s) ; + memmove(sa->s + sa->len, s, n) ; sa->len += n ; return 1 ; } |