From b95d2f553c37b80e0d89a811a1821016700e8510 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 24 Dec 2019 17:55:51 +0800 Subject: [PATCH] ntdll: Use default casemap and codepage file names if the value in registry is empty. This helps to keep compatibility with old prefixes being reused for wine-5.0. Old prefixes in their registry have [System\\CurrentControlSet\\Control\\Nls\\Codepage] "37"="" [System\\CurrentControlSet\\Control\\Nls\\Language] "0409"="" and this leads to LCMapString(LCMAP_LOWERCASE/LCMAP_UPPERCASE) return garbage. This is a regression caused by 94a3add0ea7889dbd26a4ded60ace1c40b02ed89. Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- dlls/ntdll/locale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index d9e4e8086e8..e3f562808b7 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -218,7 +218,7 @@ static NTSTATUS open_nls_data_file( ULONG type, ULONG id, HANDLE *file ) NtClose( handle ); } - if (!name) /* otherwise some hardcoded defaults */ + if (!name || !*name) /* otherwise some hardcoded defaults */ { switch (type) {