From 05d629264c9e0053143e6a726eb892cdbf867373 Mon Sep 17 00:00:00 2001 From: Thomas Weidenmueller Date: Fri, 12 May 2006 00:07:59 +0200 Subject: [PATCH] oleaut32: Fix converting file name to Unicode. Fix converting the typelib file name to Unicode by using the correct buffer size. --- dlls/oleaut32/tmarshal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 139662d3da2..b25cc4db2b5 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -300,7 +300,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));