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

View file

@ -3602,6 +3602,9 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoType(
ITypeLibImpl *This = (ITypeLibImpl *)iface;
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);