mirror of
https://github.com/ip7z/7zip.git
synced 2025-12-06 07:12:00 +01:00
fix length calculation
This commit is contained in:
parent
e807cf4acc
commit
b557f6f6e1
|
|
@ -624,10 +624,10 @@ void CItem::GetUnicodeString(UString &res, const AString &s, bool isComment, boo
|
|||
|
||||
iconv_close(cd);
|
||||
|
||||
AString sUtf8CorrectLength;
|
||||
size_t dstCorrectLength = dst - dstStart;
|
||||
sUtf8CorrectLength.SetFrom(sUtf8, static_cast<unsigned>(dstCorrectLength));
|
||||
if (ConvertUTF8ToUnicode(sUtf8CorrectLength, res) /*|| ignore_Utf8_Errors*/)
|
||||
sUtf8.ReleaseBuf_SetEnd(static_cast<unsigned>(dstCorrectLength));
|
||||
|
||||
if (ConvertUTF8ToUnicode(sUtf8, res) /*|| ignore_Utf8_Errors*/)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue