[kservice] fix the problem of rt_strlen crashed in win32
This commit is contained in:
parent
8213bbd92e
commit
ebe9fc5771
|
@ -461,7 +461,17 @@ RTM_EXPORT(rt_strncpy);
|
|||
*/
|
||||
char *rt_strcpy(char *dst, const char *src)
|
||||
{
|
||||
return rt_strncpy(dst, src, (rt_size_t)-1);
|
||||
char *dest = dst;
|
||||
|
||||
while (*src != '\0')
|
||||
{
|
||||
*dst = *src;
|
||||
dst++;
|
||||
src++;
|
||||
}
|
||||
|
||||
*dst = '\0';
|
||||
return dest;
|
||||
}
|
||||
RTM_EXPORT(rt_strcpy);
|
||||
|
||||
|
|
Loading…
Reference in New Issue