2009/2/4 Marcus Meissner marcus@jet.franken.de:
@@ -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));
Dividing a string length (which returns character count) by sizeof(WCHAR) doesn't look right.
On Thu, Feb 05, 2009 at 03:53:04PM +0000, Rob Shearman wrote:
2009/2/4 Marcus Meissner marcus@jet.franken.de:
@@ -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));
Dividing a string length (which returns character count) by sizeof(WCHAR) doesn't look right.
d'oh, fixed. (now: size/sizeof(WCHAR)-strlenW(url))
Ciao, Marcus