Fixed no option bug

This commit is contained in:
Ryan Ward 2021-01-22 16:21:54 -05:00
parent fcb6c5678a
commit 856d300b9e
8 changed files with 6 additions and 1 deletions

Binary file not shown.

View File

@ -257,7 +257,7 @@ namespace OnePass
this.MaximumSize = new System.Drawing.Size(396, 219); this.MaximumSize = new System.Drawing.Size(396, 219);
this.MinimumSize = new System.Drawing.Size(396, 219); this.MinimumSize = new System.Drawing.Size(396, 219);
this.Name = "Form1"; this.Name = "Form1";
this.Text = "OnePass V1.1"; this.Text = "OnePass V1.2";
((System.ComponentModel.ISupportInitialize)(this.passCycle)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.passCycle)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.passLength)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.passLength)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);

View File

@ -124,6 +124,11 @@ namespace OnePass
addLower(ref chars); addLower(ref chars);
if (uAtoZ.BackColor == System.Drawing.SystemColors.Highlight) if (uAtoZ.BackColor == System.Drawing.SystemColors.Highlight)
addUpper(ref chars); addUpper(ref chars);
if (chars.Count == 0)
{
MessageBox.Show("Must have at least one option turned on to generate a password!");
return;
}
byte[] sn_bytes = Encoding.ASCII.GetBytes(sitename.Text); byte[] sn_bytes = Encoding.ASCII.GetBytes(sitename.Text);
byte[] un_bytes = Encoding.ASCII.GetBytes(username.Text); byte[] un_bytes = Encoding.ASCII.GetBytes(username.Text);
byte[] mp_bytes = Encoding.ASCII.GetBytes(masterpass.Text); byte[] mp_bytes = Encoding.ASCII.GetBytes(masterpass.Text);

Binary file not shown.

Binary file not shown.

Binary file not shown.