From a85895d2401f146a6e275e55e51c7e5b1ddf5122 Mon Sep 17 00:00:00 2001 From: Misha Koshelev Date: Thu, 22 Feb 2007 00:39:52 -0600 Subject: [PATCH] oleview: Account for unnamed right hand side parameter of propput. --- programs/oleview/typelib.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c index 91c177532cf..c452343bf57 100644 --- a/programs/oleview/typelib.c +++ b/programs/oleview/typelib.c @@ -437,6 +437,7 @@ int EnumFuncs(ITypeInfo *pTypeInfo, int cFuncs, HTREEITEM hParent) BSTR bstrName, *bstrParamNames; WCHAR wszText[MAX_LOAD_STRING]; WCHAR wszAfter[MAX_LOAD_STRING]; + WCHAR szRhs[] = {'r','h','s',0}; /* Right-hand side of a propput */ BOOL bFirst; U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM; @@ -531,10 +532,10 @@ int EnumFuncs(ITypeInfo *pTypeInfo, int cFuncs, HTREEITEM hParent) AddToTLDataStrW(tld, bstrName); AddToTLDataStrW(tld, wszOpenBrackets2); - for(j=0; jcParams; j++) { if(j != 0) AddToTLDataStrW(tld, wszComa); - if(namesNo-1 != 1) + if(pFuncDesc->cParams != 1) { AddToTLDataStrW(tld, wszNewLine); AddSpaces(tld, tabSize); @@ -574,8 +575,12 @@ int EnumFuncs(ITypeInfo *pTypeInfo, int cFuncs, HTREEITEM hParent) AddToTLDataStrW(tld, wszText); AddToTLDataStrW(tld, wszAfter); AddToTLDataStrW(tld, wszSpace); - AddToTLDataStrW(tld, bstrParamNames[j+1]); - SysFreeString(bstrParamNames[j+1]); + if (j+1 < namesNo) { + AddToTLDataStrW(tld, bstrParamNames[j+1]); + SysFreeString(bstrParamNames[j+1]); + } else { + AddToTLDataStrW(tld, szRhs); + } } AddToTLDataStrW(tld, wszCloseBrackets2); AddToTLDataStrW(tld, wszSemicolon);