[PATCH] mshtml: fixed size passed to MBtoWC

Marcus Meissner marcus at jet.franken.de
Thu Feb 5 15:03:59 CST 2009


Hi,

Rob spotted this, lstrlenW is already in character count,
but size is not.

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 62386ec..d76f650 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), (size-strlenW(url))/sizeof(WCHAR));
+        MultiByteToWideChar(CP_ACP, 0, GECKO_VERSION, -1, url+strlenW(url), size/sizeof(WCHAR)-strlenW(url));
     }
 
     TRACE("Got URL %s\n", debugstr_w(url));
-- 
1.5.6



More information about the wine-patches mailing list