X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=scp.c;h=1c601e979363cc356abc75526c2c0585ba13d9e1;hb=4c31b113a6deb4894b640e4989ae9ef1f8063c0e;hp=fe341be13c57839004e4c465343439056937268d;hpb=c2914f219115472f57af947406a1bf199c044276;p=PuTTY.git diff --git a/scp.c b/scp.c index fe341be1..1c601e97 100644 --- a/scp.c +++ b/scp.c @@ -370,7 +370,7 @@ static void do_cmd(char *host, char *user, char *cmd) /* See if host is of the form user@host */ if (cfg.host[0] != '\0') { - char *atsign = strchr(cfg.host, '@'); + char *atsign = strrchr(cfg.host, '@'); /* Make sure we're not overflowing the user field */ if (atsign) { if (atsign - cfg.host < sizeof cfg.username) {