Fix crash if the password field is the first field in a form.

git-svn-id: svn://10.0.0.236/trunk@145824 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com 2003-08-09 20:38:09 +00:00
parent 65b94b95cd
commit 10fcafb2d7

View File

@ -757,7 +757,7 @@ nsPasswordManager::Notify(nsIContent* aFormNode,
case 1: // normal login
{
// Search backwards from the password field to find a username field.
for (PRUint32 j = firstPasswordIndex - 1; j >= 0; --j) {
for (PRInt32 j = (PRInt32) firstPasswordIndex - 1; j >= 0; --j) {
nsCOMPtr<nsIFormControl> control;
formElement->GetElementAt(j, getter_AddRefs(control));