From 04f90ca78aac84484c5d48ac7fc4dc5e07c728d5 Mon Sep 17 00:00:00 2001 From: Huw D M Davies Date: Tue, 2 Oct 2001 17:25:55 +0000 Subject: [PATCH] Long nameless args in SLTG apparently get denoted by 0xfffe. --- dlls/oleaut32/typelib.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 5e76755955b..7b0a5220d27 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -2480,20 +2480,29 @@ static SLTG_TypeInfoTail *SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI, for(param = 0; param < (*ppFuncDesc)->funcdesc.cParams; param++) { char *paramName = pNameTable + *pArg; - /* right, if the arg type follows then paramName points to the 2nd - letter of the name (or there is no name), else if the next - WORD is an offset to the arg type then paramName points to the - first letter. So let's take one char off paramName and if we're - pointing at an alpha-numeric char. Got that? */ + BOOL HaveOffs; + /* If arg type follows then paramName points to the 2nd + letter of the name, else the next WORD is an offset to + the arg type and paramName points to the first letter. + So let's take one char off paramName and see if we're + pointing at an alpha-numeric char. However if *pArg is + 0xffff or 0xfffe then the param has no name, the former + meaning that the next WORD is the type, the latter + meaning the the next WORD is an offset to the type. */ - if(*pArg == 0xffff) /* If we don't have a name the type seems to - always follow. FIXME is this correct? */ - paramName = NULL; + HaveOffs = FALSE; + if(*pArg == 0xffff) + paramName = NULL; + else if(*pArg == 0xfffe) { + paramName = NULL; + HaveOffs = TRUE; + } + else if(!isalnum(*(paramName-1))) + HaveOffs = TRUE; pArg++; - if(paramName && !isalnum(*(paramName-1))) { /* the next word is an - offset to type */ + if(HaveOffs) { /* the next word is an offset to type */ pType = (WORD*)(pFirstItem + *pArg); SLTG_DoType(pType, pFirstItem, &(*ppFuncDesc)->funcdesc.lprgelemdescParam[param]);