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

This commit is contained in:
morse%netscape.com 1999-06-11 23:48:57 +00:00
parent 05624ea4f6
commit 5bafde31ec

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 */