From: Dmitry Timoshkov <dmitry(a)baikal.ru> typeinfo count in an SLTG typelib is written right before typeinfo blocks. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/oleaut32/typelib.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 42f4e95b938..c4f00ca5bea 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -4485,9 +4485,6 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) return NULL; } - /* There are pHeader->nrOfFileBlks - 2 TypeInfo records in this typelib */ - pTypeLibImpl->TypeInfoCount = pHeader->nrOfFileBlks - 2; - /* This points to pHeader->nrOfFileBlks - 1 of SLTG_BlkEntry */ pBlkEntry = (SLTG_BlkEntry*)(pHeader + 1); @@ -4508,7 +4505,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) pIndex = (SLTG_Index*)(pMagic+1); - pPad9 = (SLTG_Pad9*)(pIndex + pTypeLibImpl->TypeInfoCount); + pPad9 = (SLTG_Pad9*)(pIndex + pHeader->nrOfFileBlks - 2); pFirstBlk = pPad9 + 1; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7383