better implementation of stpcpy for pre-Android 21 NDK

This commit is contained in:
Nathan Freitas 2016-01-25 11:57:16 -05:00
parent ab8709dd2e
commit 4913b0ca32
1 changed files with 4 additions and 2 deletions

View File

@ -2699,8 +2699,10 @@ int dump_cache(int fd, const unsigned char *name, int exact)
char *stpcpy(char *dest, char const *src)
{
strcpy(dest, src);
return dest + strlen(dest);
size_t src_len = strlen(src);
return memcpy(dest, src, src_len) + src_len;
// strcpy(dest, src);
// return dest + strlen(dest);
}