From: Edward O'Callaghan edward@antitrust.cc
Co-Author: Damien Zammit damien@zamaudio.com Signed-off-by: Edward O'Callaghan edward@antitrust.cc --- dlls/oleaut32/tests/typelib.c | 2 -- dlls/oleaut32/typelib.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index f75102538fe..8c8db803be8 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -3167,10 +3167,8 @@ static void test_CreateTypeLib(SYSKIND sys) {
hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti_2); ok(hres == S_OK, "Failed to get reference typeinfo, hr %#lx.\n", hres); -todo_wine { ok(ti == ti_2, "Unexpected typeinfo instance.\n"); EXPECT_REF(dual, 4); -} ITypeInfo_AddRef(ti_2); todo_wine EXPECT_REF(dual, 5); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index fcf778553c7..552f877e5ba 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -7788,9 +7788,9 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( if ((INT)hRefType < 0) { ITypeInfoImpl *pTypeInfoImpl;
- if (!(This->typeattr.wTypeFlags & TYPEFLAG_FDUAL) || - !(This->typeattr.typekind == TKIND_INTERFACE || - This->typeattr.typekind == TKIND_DISPATCH)) + if (!(This->typeattr.wTypeFlags & TYPEFLAG_FDUAL) && + (This->typeattr.typekind != TKIND_INTERFACE) && + (This->typeattr.typekind != TKIND_DISPATCH)) return TYPE_E_ELEMENTNOTFOUND;
/* when we meet a DUAL typeinfo, we must create the alternate