diff --git a/Password Manager/PasswordGenerator.cs b/Password Manager/PasswordGenerator.cs index 634e2cc..aff5b8d 100644 --- a/Password Manager/PasswordGenerator.cs +++ b/Password Manager/PasswordGenerator.cs @@ -46,14 +46,13 @@ namespace Password_Generator CreateNoWindow = true } }; - proc.Start(); - StringBuilder builder = new StringBuilder(); + StringBuilder builder = new StringBuilder(); while (!proc.StandardOutput.EndOfStream) { - builder.Append(proc.StandardOutput.ReadLine()); - return builder.ToString(); + builder.Append(proc.StandardOutput.ReadLine()); + return builder.ToString(); } } catch (Exception ex) @@ -61,7 +60,6 @@ namespace Password_Generator MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return null; } - } } }