[PATCH 0/1] MR11694: win32u: Fix get_locale_data() table entry lookup.
The issue showed up for me in `test_ActivateKeyboardLayout()` as a sometimes wrong `wparam` in `WM_INPUTLANGCHANGE` messages, after implementing more of `X11DRV_ActivateKeyboardLayout()`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11694
From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/win32u/font.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index dcc75e8096b..97936e93adb 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -3589,7 +3589,8 @@ const NLS_LOCALE_DATA *get_locale_data( LCID lcid ) else if (lcid > lcids_index[pos].id) min = pos + 1; else { - ULONG offset = locale_table->locales_offset + pos * locale_table->locale_size; + const NLS_LOCALE_LCID_INDEX *entry = &lcids_index[pos]; + ULONG offset = locale_table->locales_offset + entry->idx * locale_table->locale_size; return (const NLS_LOCALE_DATA *)((const char *)locale_table + offset); } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11694
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11694
participants (3)
-
Huw Davies (@huw) -
Matteo Bruni -
Matteo Bruni (@Mystral)