Commit 4ad14746 authored by Santino Mazza's avatar Santino Mazza Committed by Alexandre Julliard

mlang: Fix GetStrCodePages for characters with different codepages.

parent b413d497
......@@ -3340,7 +3340,12 @@ static HRESULT WINAPI fnIMLangFontLink2_GetStrCodePages( IMLangFontLink2* iface,
if (ret != S_OK) return E_FAIL;
if (!cps) cps = cp;
else cps &= cp;
else if ((cps & cp) != 0) cps &= cp;
else
{
i--;
break;
}
/* FIXME: not tested */
if (priority_cp & cps) break;
......
......@@ -1280,8 +1280,8 @@ static void IMLangFontLink_Test(IMLangFontLink* iMLFL)
processed = 0;
ret = IMLangFontLink_GetStrCodePages(iMLFL, str, 4, 0, &dwCodePages, &processed);
ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %lx\n", ret);
todo_wine ok(dwCodePages == dwCmpCodePages, "expected %lx, got %lx\n", dwCmpCodePages, dwCodePages);
todo_wine ok(processed == 3, "expected 3, got %ld\n", processed);
ok(dwCodePages == dwCmpCodePages, "expected %lx, got %lx\n", dwCmpCodePages, dwCodePages);
ok(processed == 3, "expected 3, got %ld\n", processed);
dwCodePages = 0xffff;
processed = -1;
......
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