Fix case where UTF16stoUTF8s in cellL10n.cpp would always fail out if compiled with Visual Studio.

This commit is contained in:
lioncash 2014-03-24 09:03:37 -04:00
parent 4db1f49aaf
commit 8302e6c001

View File

@ -47,8 +47,10 @@ int UTF16stoUTF8s(mem16_ptr_t utf16, mem64_t utf16_len, mem8_ptr_t utf8, mem64_t
std::string str = convert.to_bytes(wstr);
if (!utf8.IsGood() || utf8_len.GetValue() < str.size())
{
utf8_len = str.size();
return DSTExhausted;
}
utf8_len = str.size();
Memory.WriteString(utf8, str.c_str());