1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 04:22:47 -05:00

Plink and PSCP were failing to load the `Default Settings' options

when connecting to an arbitrary hostname. In particular, setting a
default user name didn't work. Now it does.

[originally from svn r747]
This commit is contained in:
Simon Tatham
2000-10-23 12:20:53 +00:00
parent 5d27e5775c
commit d0635e9d39
2 changed files with 6 additions and 3 deletions

1
scp.c
View File

@ -444,6 +444,7 @@ static void do_cmd(char *host, char *user, char *cmd)
do_defaults(host, &cfg);
if (cfg.host[0] == '\0') {
/* No settings for this host; use defaults */
do_defaults(NULL, &cfg);
strncpy(cfg.host, host, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = 22;