Re: wininet: Pass -1 into WideCharToMultiByte instead of calling lstrlenW on the string to slightly reduce code size.
24 May
2007
24 May
'07
10:28 a.m.
Robert Shearman <rob(a)codeweavers.com> writes:
@@ -504,8 +504,8 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue
if (is_basic_auth_value(pszAuthValue)) { - int userlen = WideCharToMultiByte(CP_UTF8, 0, domain_and_username, lstrlenW(domain_and_username), NULL, 0, NULL, NULL); - int passlen = WideCharToMultiByte(CP_UTF8, 0, password, lstrlenW(password), NULL, 0, NULL, NULL); + int userlen = WideCharToMultiByte(CP_UTF8, 0, domain_and_username, -1, NULL, 0, NULL, NULL); + int passlen = WideCharToMultiByte(CP_UTF8, 0, password, -1, NULL, 0, NULL, NULL);
This won't work, -1 is not equivalent to lstrlenW. -- Alexandre Julliard julliard(a)winehq.org
6867
Age (days ago)
6867
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard