Fixed convertCharType when converting from wchar_t to char.
This commit is contained in:
parent
addae96c91
commit
e6556c6f90
@ -530,7 +530,7 @@ ConvertCharTypeResult convertCharType(const TFrom* chrFrom, std::size_t numFrom,
|
||||
if (numTo < MB_CUR_MAX)
|
||||
{
|
||||
char tmpBuf[MB_LEN_MAX];
|
||||
const ConvertCharTypeResult result = convertCharType(chrFrom, tmpBuf, mbstate);
|
||||
const ConvertCharTypeResult result = convertCharType(chrFrom, numFrom, tmpBuf, MB_LEN_MAX, mbstate);
|
||||
if (result && result.numWritten <= numTo)
|
||||
{
|
||||
std::memcpy(outTo, tmpBuf, result.numWritten);
|
||||
|
Loading…
x
Reference in New Issue
Block a user