diff --git a/src/common/src/tvariant.c b/src/common/src/tvariant.c index 95aa576889a21f04611dabcf2379cd091b435399..fa95e17f32556e63935da51af33e990f1363a170 100644 --- a/src/common/src/tvariant.c +++ b/src/common/src/tvariant.c @@ -775,7 +775,7 @@ int32_t tVariantDump(tVariant *pVariant, char *payload, int16_t type, bool inclu return -1; } } else { - wcsncpy((wchar_t *)p, pVariant->wpz, pVariant->nLen); + memcpy(p, pVariant->wpz, pVariant->nLen); newlen = pVariant->nLen; } @@ -867,4 +867,4 @@ int32_t tVariantTypeSetType(tVariant *pVariant, char type) { } return 0; -} \ No newline at end of file +}