diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-11-24 03:07:16 +0100 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-03-19 19:56:25 +0100 |
commit | fe29152d063d4c63a27fdf498afc71059186d686 (patch) | |
tree | fea51cc6651cec4591f33c905369f5b235758cfa | |
parent | c3843d79de39b6ed695e24e8f325408b342c085f (diff) | |
download | mpv-fe29152d063d4c63a27fdf498afc71059186d686.tar.bz2 mpv-fe29152d063d4c63a27fdf498afc71059186d686.tar.xz |
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
-rw-r--r-- | osdep/win32-console-wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |