From ab44df14fdddf984c39babce79e4e13a6e2516ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sun, 18 Jan 2026 09:28:49 +0100 Subject: [PATCH] osdep/language-win: fix use of GetUserPreferredUILanguages() Commit baf2fd2f281745140b90baf80a4c7a1af05490e5 fixed this for 2nd call to GetSystemPreferredUILanguages(), but apparently regressed the 1st call, duh. To retrieve the size both buffer has to be NULL and size 0. Memory has a lot of zeros, because it has been working quite consistently on CI. --- osdep/language-win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osdep/language-win.c b/osdep/language-win.c index 2c2f8e4868fc2..667757d8c8f8e 100644 --- a/osdep/language-win.c +++ b/osdep/language-win.c @@ -39,7 +39,7 @@ char **mp_get_user_langs(void) char **ret = NULL; size_t ret_count = 0; wchar_t *buf = NULL; - ULONG size, count; + ULONG size = 0, count; if (!GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &count, NULL, &size)) goto done;