summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/assert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/assert.cc')
-rw-r--r--winsup/cygwin/assert.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc
index a47a3827f..edd0ee7a6 100644
--- a/winsup/cygwin/assert.cc
+++ b/winsup/cygwin/assert.cc
@@ -1,6 +1,6 @@
/* assert.cc: Handle the assert macro for WIN32.
- Copyright 1997, 1998, 2000, 2001, 2007, 2008, 2009 Red Hat, Inc.
+ Copyright 1997, 1998, 2000, 2001, 2007, 2008, 2009, 2011 Red Hat, Inc.
This file is part of Cygwin.
@@ -37,13 +37,13 @@ __assert_func (const char *file, int line, const char *func,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE)
{
- char *buf;
-
- buf = (char *) alloca (100 + strlen (failedexpr));
- __small_sprintf (buf, "Failed assertion\n\t%s\nat line %d of file %s%s%s",
- failedexpr, line, file,
- func ? "\nin function " : "", func ? func : "");
- MessageBox (NULL, buf, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
+ PWCHAR buf = (PWCHAR) alloca ((100 + strlen (failedexpr))
+ * sizeof (WCHAR));
+ __small_swprintf (buf,
+ L"Failed assertion\n\t%s\nat line %d of file %s%s%s",
+ failedexpr, line, file,
+ func ? "\nin function " : "", func ? func : "");
+ MessageBoxW (NULL, buf, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
}
else
{