Commit f4def21f authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

mlang/tests: Return correct result in Rfc1766ToLcidA on failure.

parent 7bc167ac
......@@ -1238,6 +1238,9 @@ HRESULT WINAPI Rfc1766ToLcidA(LCID *lcid, LPCSTR rfc1766A)
{
WCHAR rfc1766W[MAX_RFC1766_NAME + 1];
if (!rfc1766A)
return E_INVALIDARG;
MultiByteToWideChar(CP_ACP, 0, rfc1766A, -1, rfc1766W, MAX_RFC1766_NAME);
rfc1766W[MAX_RFC1766_NAME] = 0;
......
......@@ -935,6 +935,12 @@ static void test_Rfc1766ToLcid(void)
}
ret = Rfc1766ToLcidA(&lcid, NULL);
ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret);
ret = Rfc1766ToLcidA(NULL, "en");
ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment