diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 4b479149d7f..a89d68721cc 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -628,9 +628,11 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, SetUrlComponentValue(&lpUrlComponents->lpszUserName, &lpUrlComponents->dwUserNameLength, lpszUser, lpszPasswd - lpszUser); + if (lpszPasswd != lpszHost) + lpszPasswd++; SetUrlComponentValue(&lpUrlComponents->lpszPassword, &lpUrlComponents->dwPasswordLength, - lpszPasswd == lpszHost ? NULL : ++lpszPasswd, + lpszPasswd == lpszHost ? NULL : lpszPasswd, lpszHost - lpszPasswd); lpszcp++; /* Advance to beginning of host */