When reading resources in NLS_LoadStringExW we should map

SUBLANG_NEUTRAL to SUBLANG_DEFAULT.
oldstable
Huw D M Davies 2001-05-29 20:52:44 +00:00 committed by Alexandre Julliard
parent 738e2461f0
commit 0925d6ecb4
1 changed files with 4 additions and 0 deletions

View File

@ -418,6 +418,10 @@ static INT NLS_LoadStringExW(HMODULE hModule, LANGID lang_id, UINT res_id, LPWST
int string_num;
int i;
/* Replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT */
if(SUBLANGID(lang_id) == SUBLANG_NEUTRAL)
lang_id = MAKELANGID(PRIMARYLANGID(lang_id), SUBLANG_DEFAULT);
hrsrc = FindResourceExW(hModule, RT_STRINGW, (LPCWSTR)((res_id >> 4) + 1), lang_id);
if(!hrsrc) return 0;