[PATCH] pass correct size to MBtoWC

Marcus Meissner marcus at jet.franken.de
Sun Sep 14 06:11:09 CDT 2008


Hi,

MultiBytetoWideChar gets character counts, not
bytes as arguments.

(Spotted by the HeapAlloc alloc_size annotation,
and the static MBtoWC wrapper I am currently testing.)

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

diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index 8c76464..60d1f70 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -223,7 +223,7 @@ static BOOL create_wide_manifest(const char *filename, const char *manifest, BOO
     BOOL ret;
     int offset = (fBOM ? 0 : 1);
 
-    MultiByteToWideChar(CP_ACP, 0, manifest, -1, &wmanifest[1], (strlen(manifest)+1) * sizeof(WCHAR));
+    MultiByteToWideChar(CP_ACP, 0, manifest, -1, &wmanifest[1], (strlen(manifest)+1));
     wmanifest[0] = 0xfeff;
     if (fReverse)
     {
-- 
1.5.2.4



More information about the wine-patches mailing list