diff --git a/console/console_ext.c b/console/console_ext.c index fa55bbe726..4161324ed5 100644 --- a/console/console_ext.c +++ b/console/console_ext.c @@ -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; }