gfx/cairo/fix-cairo-win32-print-gdi-error.diff
author Sylvestre Ledru <sledru@mozilla.com>
Thu, 12 Oct 2017 15:22:59 +0200
changeset 385816 d14dd0e5c41a54d4c5a82d7c82245c03854e5b5e
parent 61033 ba49fff91d8204d6f79f8a9558f6c9b6cecd785f
permissions -rw-r--r--
Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium MozReview-Commit-ID: 89NxxGUVjHV

diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
--- a/gfx/cairo/cairo/src/cairo-win32-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
@@ -95,20 +95,21 @@ _cairo_win32_print_gdi_error (const char
 			 FORMAT_MESSAGE_FROM_SYSTEM,
 			 NULL,
 			 last_error,
 			 MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
 			 (LPSTR) &lpMsgBuf,
 			 0, NULL)) {
 	fprintf (stderr, "%s: Unknown GDI error", context);
     } else {
-	fwprintf (stderr, "%S: %s", context, (char *)lpMsgBuf);
+	fprintf (stderr, "%s: %S", context, (char *)lpMsgBuf);
 
 	LocalFree (lpMsgBuf);
     }
+    fflush(stderr);
 
     /* We should switch off of last_status, but we'd either return
      * CAIRO_STATUS_NO_MEMORY or CAIRO_STATUS_UNKNOWN_ERROR and there
      * is no CAIRO_STATUS_UNKNOWN_ERROR.
      */
 
     return _cairo_error (CAIRO_STATUS_NO_MEMORY);
 }