From: Wolfgang Hartl <wolfo.dev@wolke7.net> --- dlls/oleaut32/typelib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index e9997a86d24..3aa4677d1db 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -4234,6 +4234,11 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, pFuncDesc->funcdesc.callconv = pFunc->nacc & 0x7; pFuncDesc->funcdesc.cParams = pFunc->nacc >> 3; pFuncDesc->funcdesc.cParamsOpt = (pFunc->retnextopt & 0x7e) >> 1; + + /* SLTG encodes vararg as 63 (max 6-bit value); normalize to -1 (MSFT convention) */ + if (pFuncDesc->funcdesc.cParamsOpt == 0x3f) + pFuncDesc->funcdesc.cParamsOpt = -1; + if (pFuncDesc->funcdesc.funckind == FUNC_DISPATCH) pFuncDesc->funcdesc.oVft = 0; else -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10923