Fix return value of GetVarIndexOfMemId.

This commit is contained in:
Huw Davies 2004-12-08 17:48:16 +00:00 committed by Alexandre Julliard
parent d646c7ed32
commit 7a6c099921
1 changed files with 7 additions and 8 deletions

View File

@ -5280,15 +5280,14 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarIndexOfMemId( ITypeInfo2 * iface,
for(i=0, pVarInfo=This->varlist; pVarInfo &&
memid != pVarInfo->vardesc.memid; i++, pVarInfo=pVarInfo->next)
;
if(pVarInfo){
*pVarIndex=i;
result= S_OK;
}else{
*pVarIndex=0;
result=E_INVALIDARG;
}
if(pVarInfo) {
*pVarIndex = i;
result = S_OK;
} else
result = TYPE_E_ELEMENTNOTFOUND;
TRACE("(%p) memid 0x%08lx -> %s\n", This,
memid, SUCCEEDED(result)? "SUCCES":"FAILED");
memid, SUCCEEDED(result) ? "SUCCESS" : "FAILED");
return result;
}