Commit 53d198cc authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Misc fixes for QueryPathOfRegTypeLib, TLB_ReadTypeLib,

ITypeInfo_fnGetContainingTypeLib.
parent 565ba589
...@@ -156,7 +156,7 @@ QueryPathOfRegTypeLib( ...@@ -156,7 +156,7 @@ QueryPathOfRegTypeLib(
/* try with sub-langid */ /* try with sub-langid */
myLCID = SUBLANGID(lcid); myLCID = SUBLANGID(lcid);
} }
else if (myLCID == SUBLANGID(lcid)) else if ((myLCID == SUBLANGID(lcid)) && myLCID)
{ {
/* try with system langid */ /* try with system langid */
myLCID = 0; myLCID = 0;
...@@ -1296,7 +1296,8 @@ int TLB_ReadTypeLib(LPSTR pszFileName, ITypeLib2 **ppTypeLib) ...@@ -1296,7 +1296,8 @@ int TLB_ReadTypeLib(LPSTR pszFileName, ITypeLib2 **ppTypeLib)
strncpy(pszDllName, pszFileName, nMemToAlloc); strncpy(pszDllName, pszFileName, nMemToAlloc);
/* move index string pointer pass the backslash */ /* move index string pointer pass the backslash */
++pszTypeLibIndex; while (*pszTypeLibIndex == '\\')
++pszTypeLibIndex;
} }
else else
{ {
...@@ -2733,6 +2734,8 @@ static HRESULT WINAPI ITypeInfo_fnGetContainingTypeLib( ITypeInfo2 *iface, ...@@ -2733,6 +2734,8 @@ static HRESULT WINAPI ITypeInfo_fnGetContainingTypeLib( ITypeInfo2 *iface,
ITypeLib * *ppTLib, UINT *pIndex) ITypeLib * *ppTLib, UINT *pIndex)
{ {
ICOM_THIS( ITypeInfoImpl, iface); ICOM_THIS( ITypeInfoImpl, iface);
if (!pIndex)
return E_INVALIDARG;
*ppTLib=(LPTYPELIB )(This->pTypeLib); *ppTLib=(LPTYPELIB )(This->pTypeLib);
*pIndex=This->index; *pIndex=This->index;
ITypeLib2_AddRef(*ppTLib); ITypeLib2_AddRef(*ppTLib);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment