[editor/util] fix: toBase64 size设置有误导致编码错误

dev-LayerStyle
ArgonarioD 2023-03-16 20:15:13 +08:00
parent 50a1bdaff4
commit fef34280c6
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ namespace EncodeUtil
{ {
QByteArray ba; QByteArray ba;
ba.resize(vec.size() * sizeof(S)); ba.resize(vec.size() * sizeof(S));
memcpy_s(ba.data(), ba.size(), vec.data(), vec.size()); memcpy_s(ba.data(), ba.size(), vec.data(), vec.size() * sizeof(S));
return ba.toBase64(); return ba.toBase64();
} }