[PATCH] oleaut32: Fixed buffer size to MBtoWC

Marcus Meissner marcus at jet.franken.de
Thu Aug 25 03:03:50 CDT 2011


Hi,

(found by my objectsize patches.)

Ciao, Marcus
---
 dlls/oleaut32/tests/vartest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index c52e3ce..7a6394a 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -348,7 +348,7 @@ static void test_var_call2( int line, HRESULT (WINAPI *func)(LPVARIANT,LPVARIANT
 static int strcmp_wa(const WCHAR *strw, const char *stra)
 {
     WCHAR buf[512];
-    MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, sizeof(buf));
+    MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, sizeof(buf)/sizeof(buf[0]));
     return lstrcmpW(strw, buf);
 }
 
-- 
1.7.3.4




More information about the wine-patches mailing list