From 0889da4316afa563c0c1faaef68948ea108e44ec Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sat, 31 Mar 2018 09:32:42 -0400 Subject: [PATCH] Don't allow empty password to be entered when using non-anon account. Fixes getting wall of exception text when accidentally entering or pasting in an empty string. --- DepotDownloader/Program.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DepotDownloader/Program.cs b/DepotDownloader/Program.cs index 0d84707..62df230 100644 --- a/DepotDownloader/Program.cs +++ b/DepotDownloader/Program.cs @@ -111,9 +111,12 @@ namespace DepotDownloader if ( username != null && password == null && ( !ContentDownloader.Config.RememberPassword || !ConfigStore.TheConfig.LoginKeys.ContainsKey( username ) ) ) { - Console.Write( "Enter account password for \"{0}\": ", username ); - password = Util.ReadPassword(); - Console.WriteLine(); + do + { + Console.Write("Enter account password for \"{0}\": ", username); + password = Util.ReadPassword(); + Console.WriteLine(); + } while ( String.Empty == password ); } else if ( username == null ) {