From fe29152d063d4c63a27fdf498afc71059186d686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Fri, 24 Nov 2023 03:07:16 +0100 Subject: [PATCH] win32-console-wrapper: fix printf specifiers %s is evaluated as wchar_t only in "Windows classic" semantic. It is not C standard compliant. %ls is compatible with both and means the same wchar_t format. This commit fixes error output from mpv.com. See: https://devblogs.microsoft.com/oldnewthing/?p=102823 --- osdep/win32-console-wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osdep/win32-console-wrapper.c b/osdep/win32-console-wrapper.c index c1e557832d..a5791631d9 100644 --- a/osdep/win32-console-wrapper.c +++ b/osdep/win32-console-wrapper.c @@ -35,7 +35,7 @@ static void cr_perror(const wchar_t *prefix) MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&error, 0, NULL); - fwprintf(stderr, L"%s: %s", prefix, error); + fwprintf(stderr, L"%ls: %ls", prefix, error); LocalFree(error); }