[ros-diffs] [hpoussin] 21893: Fix converting the typelib file name to unicode by using the correct buffer size.

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Fri May 12 00:23:20 CEST 2006


Author: hpoussin
Date: Fri May 12 02:23:20 2006
New Revision: 21893

URL: http://svn.reactos.ru/svn/reactos?rev=21893&view=rev
Log:
Fix converting the typelib file name to unicode by using the correct buffer size.

Modified:
    trunk/reactos/dll/win32/oleaut32/tmarshal.c

Modified: trunk/reactos/dll/win32/oleaut32/tmarshal.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/oleaut32/tmarshal.c?rev=21893&r1=21892&r2=21893&view=diff
==============================================================================
--- trunk/reactos/dll/win32/oleaut32/tmarshal.c (original)
+++ trunk/reactos/dll/win32/oleaut32/tmarshal.c Fri May 12 02:23:20 2006
@@ -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 Ros-diffs mailing list