From 37ebc83f7ff1caa0bca0140aa2e44120bddbca70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 17 Feb 2016 17:56:03 +0100 Subject: [PATCH] win32: use wide-char for constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the appropriate type for comparisons and assignment of wide chars. Signed-off-by: Marc-André Lureau https://bugzilla.gnome.org/show_bug.cgi?id=762202 --- glib/gwin32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/gwin32.c b/glib/gwin32.c index 584673268..e9081cc30 100644 --- a/glib/gwin32.c +++ b/glib/gwin32.c @@ -203,8 +203,8 @@ g_win32_error_message (gint error) { nchars = wcslen (msg); - if (nchars >= 2 && msg[nchars-1] == '\n' && msg[nchars-2] == '\r') - msg[nchars-2] = '\0'; + if (nchars >= 2 && msg[nchars-1] == L'\n' && msg[nchars-2] == L'\r') + msg[nchars-2] = L'\0'; retval = g_utf16_to_utf8 (msg, -1, NULL, NULL, NULL);