Fix converting the typelib file name to unicode by using the correct buffer size.
authorHervé Poussineau <hpoussin@reactos.org>
Thu, 11 May 2006 22:23:20 +0000 (22:23 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Thu, 11 May 2006 22:23:20 +0000 (22:23 +0000)
svn path=/trunk/; revision=21893

reactos/dll/win32/oleaut32/tmarshal.c

index 249524a..de6e75b 100644 (file)
@@ -283,7 +283,7 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
        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));