From 0be7fe43cab50799c2c6937eae72a7c1253706f9 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Sat, 23 Jan 2021 04:25:52 +0800 Subject: [PATCH] fix bug --- src/common/src/tvariant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/src/tvariant.c b/src/common/src/tvariant.c index 95aa576889..fa95e17f32 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 +} -- GitLab