(360) rarch_convert_char_to_wchar - use malloc
This commit is contained in:
parent
a133d2ebb5
commit
f6f101b6ab
|
@ -691,7 +691,7 @@ void rarch_console_rsound_stop(void)
|
||||||
wchar_t * rarch_convert_char_to_wchar(const char * str)
|
wchar_t * rarch_convert_char_to_wchar(const char * str)
|
||||||
{
|
{
|
||||||
unsigned long dwNum = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
unsigned long dwNum = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||||
wchar_t * w_str = new wchar_t[dwNum];
|
wchar_t * w_str = (wchar_t*)malloc(sizeof(wchar_t*) * dwNum);
|
||||||
MultiByteToWideChar(CP_ACP, 0, str, -1, w_str, dwNum);
|
MultiByteToWideChar(CP_ACP, 0, str, -1, w_str, dwNum);
|
||||||
return w_str;
|
return w_str;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue