I broke typelib loading at some point...

Huw D M Davies h.davies1 at physics.ox.ac.uk
Mon Nov 12 09:22:07 CST 2001


	Huw D M Davies <hdavies at codeweavers.com>
	Fixes stupid bug with typelib filenames.
-------------- next part --------------
Index: dlls/oleaut32/typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.55
diff -u -r1.55 typelib.c
--- dlls/oleaut32/typelib.c	2001/10/14 16:07:49	1.55
+++ dlls/oleaut32/typelib.c	2001/11/12 13:51:18
@@ -262,12 +262,11 @@
     ITypeLib **pptLib) /* [out] Pointer to pointer to loaded type library */
 {
     WCHAR szPath[MAX_PATH+1], szFileCopy[MAX_PATH+1];
-    const WCHAR *pFile, *pIndexStr;
+    WCHAR *pIndexStr;
     HRESULT res;
     INT index = 1;
     TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib);
     
-    pFile = szFile;
     if(!SearchPathW(NULL,szFile,NULL,sizeof(szPath)/sizeof(WCHAR),szPath,
 		    NULL)) {
 
@@ -278,7 +277,6 @@
 	    memcpy(szFileCopy, szFile,
 		   (pIndexStr - szFile - 1) * sizeof(WCHAR));
 	    szFileCopy[pIndexStr - szFile - 1] = '\0';
-	    pFile = szFileCopy;
 	    if(!SearchPathW(NULL,szFileCopy,NULL,sizeof(szPath)/sizeof(WCHAR),
 			    szPath,NULL))
 	        return TYPE_E_CANTLOADLIBRARY;
@@ -286,9 +284,9 @@
 	    return TYPE_E_CANTLOADLIBRARY;
     }
 
-    TRACE("File %s index %d\n", debugstr_w(pFile), index);
+    TRACE("File %s index %d\n", debugstr_w(szPath), index);
 
-    res = TLB_ReadTypeLib(pFile, index, (ITypeLib2**)pptLib);
+    res = TLB_ReadTypeLib(szPath, index, (ITypeLib2**)pptLib);
 
     if (SUCCEEDED(res))
         switch(regkind)


More information about the wine-patches mailing list