oleaut32: GetTypeInfoType - Return TYPE_E_ELEMENTNOTFOUND if index out of bounds.

This commit is contained in:
Stefan Siebert 2006-08-03 17:54:06 +02:00 committed by Alexandre Julliard
parent f740a28062
commit 9776f5b83f
1 changed files with 3 additions and 0 deletions

View File

@ -3603,6 +3603,9 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoType(
int i;
ITypeInfoImpl *pTInfo = This->pTypeInfo;
if ((ITypeLib2_fnGetTypeInfoCount(iface) < index + 1) || (index < 0))
return TYPE_E_ELEMENTNOTFOUND;
TRACE("(%p) index %d\n", This, index);
if(!pTKind) return E_INVALIDARG;