From 3b2eb121314cfb5c54f97a3afbc99d136b55f16f Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 23 Nov 2001 12:51:23 +0000 Subject: [PATCH] Ensure we ignore a hostname in Default Settings, if a perverse user has set one up using regedit. It badly confuses Plink. git-svn-id: svn://svn.tartarus.org/sgt/putty@1404 cda61777-01e9-0310-a592-d414129be87e --- settings.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/settings.c b/settings.c index 267b46d6..26c77443 100644 --- a/settings.c +++ b/settings.c @@ -296,7 +296,11 @@ void load_settings(char *section, int do_host, Config * cfg) cfg->remote_cmd_ptr = cfg->remote_cmd; cfg->remote_cmd_ptr2 = NULL; - gpps(sesskey, "HostName", "", cfg->host, sizeof(cfg->host)); + if (do_host) { + gpps(sesskey, "HostName", "", cfg->host, sizeof(cfg->host)); + } else { + cfg->host[0] = '\0'; /* blank hostname */ + } gpps(sesskey, "LogFileName", "putty.log", cfg->logfilename, sizeof(cfg->logfilename)); gppi(sesskey, "LogType", 0, &cfg->logtype); -- 2.11.0