fixed faulty logic re: pressing cancel in order not to use database passwords

git-svn-id: svn://10.0.0.236/trunk@34909 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
morse%netscape.com 1999-06-11 23:48:57 +00:00
parent 67d6e29690
commit 7bb2fa955d

View File

@ -750,7 +750,7 @@ Wallet_SetKey(PRBool isNewkey) {
newkey = wallet_GetString(password);
}
if (newkey == NULL) { /* user hit cancel button */
if (wallet_KeySize() == 0) { /* no password file existed before */
if (wallet_KeySize() < 0) { /* no password file existed before */
newkey = PL_strdup(""); /* use zero-length password */
} else {
return PR_FALSE; /* user could not supply the correct password */