[PATCH] mshtml: Fixed last argument to MBtoWC

Marcus Meissner marcus at jet.franken.de
Wed Feb 4 12:02:26 CST 2009


Hi,

Last argument must not be -1, it needs to
be either a character buffersize or 0.

Ciao, Marcus
---
 dlls/mshtml/install.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index 605fa05..932c6c5 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -442,7 +442,7 @@ static LPWSTR get_url(void)
 
     if(size > sizeof(httpW) && !memcmp(url, httpW, sizeof(httpW))) {
         strcatW(url, v_formatW);
-        MultiByteToWideChar(CP_ACP, 0, GECKO_VERSION, -1, url+strlenW(url), -1);
+        MultiByteToWideChar(CP_ACP, 0, GECKO_VERSION, -1, url+strlenW(url), (size-strlenW(url))/sizeof(WCHAR));
     }
 
     TRACE("Got URL %s\n", debugstr_w(url));
-- 
1.5.6



More information about the wine-patches mailing list