From: Anton Mitrofanov Date: Mon, 26 Aug 2013 17:20:31 +0000 (+0400) Subject: Fix masked access violation in KERNEL32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bcff2a62c050376ca54c5e5040d0529c89eb9f2;p=libx264 Fix masked access violation in KERNEL32 Caused crashes under gdb in Windows and might cause other unknown problems. --- diff --git a/common/osdep.c b/common/osdep.c index 6952dd0a..7564f654 100644 --- a/common/osdep.c +++ b/common/osdep.c @@ -192,7 +192,8 @@ int x264_vfprintf( FILE *stream, const char *format, va_list arg ) { /* WriteConsoleW is the most reliable way to output Unicode to a console. */ int length_utf16 = MultiByteToWideChar( CP_UTF8, 0, buf, length, buf_utf16, sizeof(buf_utf16)/sizeof(wchar_t) ); - WriteConsoleW( console, buf_utf16, length_utf16, NULL, NULL ); + DWORD written; + WriteConsoleW( console, buf_utf16, length_utf16, &written, NULL ); return length; } }