summaryrefslogtreecommitdiff
path: root/src/i_system.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_system.c')
-rw-r--r--src/i_system.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/i_system.c b/src/i_system.c
index 1003075f..0ec8e185 100644
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -113,6 +113,11 @@ byte *I_ZoneBase (int *size)
*size = I_GetHeapSize();
zonemem = malloc(*size);
+
+ if (zonemem == NULL)
+ {
+ I_Error("Failed to allocate %i bytes for zone memory", *size);
+ }
printf("zone memory: %p, %x allocated for zone\n",
zonemem, *size);
@@ -261,13 +266,18 @@ void I_Error (char *error, ...)
// On Windows, pop up a dialog box with the error message.
{
char msgbuf[512];
+ wchar_t wmsgbuf[512];
va_start(argptr, error);
memset(msgbuf, 0, sizeof(msgbuf));
vsnprintf(msgbuf, sizeof(msgbuf) - 1, error, argptr);
va_end(argptr);
- MessageBox(NULL, msgbuf, "Error", MB_OK);
+ MultiByteToWideChar(CP_ACP, 0,
+ msgbuf, strlen(msgbuf) + 1,
+ wmsgbuf, sizeof(wmsgbuf));
+
+ MessageBoxW(NULL, wmsgbuf, L"Error", MB_OK);
}
#endif