oleaut32: Fix converting file name to unicode

Thomas Weidenmueller wine-patches at reactsoft.com
Thu May 11 17:07:59 CDT 2006


Fix converting the typelib file name to unicode by using the correct
buffer size.

- Thomas

-- 
P.S.: Please let me know if there's something wrong with this patch or
tell me why it was rejected. Otherwise I'm going to assume the fixes
aren't appreciated or necessary because the implementation is considered
mature and stable.
-------------- next part --------------
Index: dlls/oleaut32/tmarshal.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tmarshal.c,v
retrieving revision 1.80
diff -u -r1.80 tmarshal.c
--- dlls/oleaut32/tmarshal.c	14 Feb 2006 13:31:28 -0000	1.80
+++ dlls/oleaut32/tmarshal.c	11 May 2006 22:04:07 -0000
@@ -283,7 +283,7 @@
 	ERR("Could not get typelib fn?\n");
 	return E_FAIL;
     }
-    MultiByteToWideChar(CP_ACP, 0, tlfn, -1, tlfnW, -1);
+    MultiByteToWideChar(CP_ACP, 0, tlfn, -1, tlfnW, sizeof(tlfnW) / sizeof(tlfnW[0]));
     hres = LoadTypeLib(tlfnW,&tl);
     if (hres) {
 	ERR("Failed to load typelib for %s, but it should be there.\n",debugstr_guid(riid));


More information about the wine-patches mailing list