diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c index bd6a7f57f67..14122c8dde3 100644 --- a/dlls/mlang/mlang.c +++ b/dlls/mlang/mlang.c @@ -1222,8 +1222,6 @@ HRESULT WINAPI Rfc1766ToLcidW(LCID *pLocale, LPCWSTR pszRfc1766) if (!pLocale || !pszRfc1766) return E_INVALIDARG; - *pLocale = 0; - hr = EnumRfc1766_create(0, &enumrfc1766); if (FAILED(hr)) return hr; diff --git a/dlls/mlang/tests/mlang.c b/dlls/mlang/tests/mlang.c index d39e0e3e954..b0b4743f58e 100644 --- a/dlls/mlang/tests/mlang.c +++ b/dlls/mlang/tests/mlang.c @@ -55,6 +55,11 @@ typedef struct lcid_tag_table { } lcid_table_entry; static const lcid_table_entry lcid_table[] = { + {"e", -1, E_FAIL}, + {"", -1, E_FAIL}, + {"-", -1, E_FAIL}, + {"e-", -1, E_FAIL}, + {"en", 9, S_OK}, /* only en is special (using PRIMARYLANGID) */ {"en-gb", 0x809, S_OK}, {"en-us", 0x409, S_OK} @@ -850,11 +855,7 @@ static void test_GetLcidFromRfc1766(IMultiLanguage2 *iML2) HRESULT ret; DWORD i; - static WCHAR e[] = { 'e',0 }; static WCHAR en[] = { 'e','n',0 }; - static WCHAR empty[] = { 0 }; - static WCHAR dash[] = { '-',0 }; - static WCHAR e_dash[] = { 'e','-',0 }; static WCHAR en_them[] = { 'e','n','-','t','h','e','m',0 }; static WCHAR english[] = { 'e','n','g','l','i','s','h',0 }; @@ -878,18 +879,6 @@ static void test_GetLcidFromRfc1766(IMultiLanguage2 *iML2) ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, NULL); ok(ret == E_INVALIDARG, "GetLcidFromRfc1766 returned: %08x\n", ret); - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, e); - ok(ret == E_FAIL, "GetLcidFromRfc1766 returned: %08x\n", ret); - - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, empty); - ok(ret == E_FAIL, "GetLcidFromRfc1766 returned: %08x\n", ret); - - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, dash); - ok(ret == E_FAIL, "GetLcidFromRfc1766 returned: %08x\n", ret); - - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, e_dash); - ok(ret == E_FAIL, "GetLcidFromRfc1766 returned: %08x\n", ret); - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, en_them); ok((ret == E_FAIL || ret == S_FALSE), "GetLcidFromRfc1766 returned: %08x\n", ret); if (ret == S_FALSE)