summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/strconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/windows/strconv.c')
-rw-r--r--src/osd/windows/strconv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osd/windows/strconv.c b/src/osd/windows/strconv.c
index 14cd614951e..0af5fe9c2a3 100644
--- a/src/osd/windows/strconv.c
+++ b/src/osd/windows/strconv.c
@@ -65,7 +65,7 @@ CHAR *astring_from_utf8(const char *utf8string)
// convert UTF-16 to "ANSI code page" string
char_count = WideCharToMultiByte(CP_ACP, 0, wstring, -1, NULL, 0, NULL, NULL);
- result = (CHAR *)osd_malloc(char_count * sizeof(*result));
+ result = (CHAR *)osd_malloc_array(char_count * sizeof(*result));
if (result != NULL)
WideCharToMultiByte(CP_ACP, 0, wstring, -1, result, char_count, NULL, NULL);
@@ -90,7 +90,7 @@ char *utf8_from_astring(const CHAR *astring)
// convert UTF-16 to MAME string (UTF-8)
char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, NULL, 0, NULL, NULL);
- result = (CHAR *)osd_malloc(char_count * sizeof(*result));
+ result = (CHAR *)osd_malloc_array(char_count * sizeof(*result));
if (result != NULL)
WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, NULL, NULL);
@@ -109,7 +109,7 @@ WCHAR *wstring_from_utf8(const char *utf8string)
// convert MAME string (UTF-8) to UTF-16
char_count = MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, NULL, 0);
- result = (WCHAR *)osd_malloc(char_count * sizeof(*result));
+ result = (WCHAR *)osd_malloc_array(char_count * sizeof(*result));
if (result != NULL)
MultiByteToWideChar(CP_UTF8, 0, utf8string, -1, result, char_count);
@@ -128,7 +128,7 @@ char *utf8_from_wstring(const WCHAR *wstring)
// convert UTF-16 to MAME string (UTF-8)
char_count = WideCharToMultiByte(CP_UTF8, 0, wstring, -1, NULL, 0, NULL, NULL);
- result = (char *)osd_malloc(char_count * sizeof(*result));
+ result = (char *)osd_malloc_array(char_count * sizeof(*result));
if (result != NULL)
WideCharToMultiByte(CP_UTF8, 0, wstring, -1, result, char_count, NULL, NULL);