(360) rarch_convert_char_to_wchar - use malloc

This commit is contained in:
TwinAphex51224 2012-05-29 00:06:43 +02:00
parent a133d2ebb5
commit f6f101b6ab
1 changed files with 1 additions and 1 deletions

View File

@ -691,7 +691,7 @@ void rarch_console_rsound_stop(void)
wchar_t * rarch_convert_char_to_wchar(const char * str)
{
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);
return w_str;
}