From 9e941d1fabb2de4b15f169057a07dc395307d2ce Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Mon, 26 Aug 2013 21:20:31 +0400 Subject: [PATCH] Fix masked access violation in KERNEL32 Caused crashes under gdb in Windows and might cause other unknown problems. --- common/osdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- 2.47.3