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
This commit is contained in:
Kacper Michajłow 2023-11-24 03:07:16 +01:00
parent c3843d79de
commit fe29152d06
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ static void cr_perror(const wchar_t *prefix)
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)&error, 0, NULL); (LPWSTR)&error, 0, NULL);
fwprintf(stderr, L"%s: %s", prefix, error); fwprintf(stderr, L"%ls: %ls", prefix, error);
LocalFree(error); LocalFree(error);
} }