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

This commit is contained in:
bryner%brianryner.com 2003-08-09 20:38:09 +00:00
Родитель 47954d836d
Коммит 19059ea976
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

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