mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
WIN32: Fix convertEncoding
problem due to String deallcation
This commit is contained in:
parent
ce11c13ffa
commit
a611975561
@ -436,9 +436,11 @@ char *OSystem_Win32::convertEncoding(const char* to, const char *from, const cha
|
||||
#endif
|
||||
// UTF-32 is really important for us, because it is used for the
|
||||
// transliteration in Common::Encoding and Win32 cannot convert it
|
||||
Common::String tempString;
|
||||
if (Common::String(from).hasPrefixIgnoreCase("utf-32")) {
|
||||
Common::U32String UTF32Str((const uint32 *)string, length / 4);
|
||||
string = Common::convertUtf32ToUtf8(UTF32Str).c_str();
|
||||
tempString = Common::convertUtf32ToUtf8(UTF32Str);
|
||||
string = tempString.c_str();
|
||||
from = "utf-8";
|
||||
}
|
||||
if (Common::String(to).hasPrefixIgnoreCase("utf-32")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user