X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/3608528b1152168da3032e8df4023df45b87299f..05bea829b8868f5db4ac048897e944ed05dfc457:/plink.c diff --git a/plink.c b/plink.c index 307d7298..f6e2a702 100644 --- a/plink.c +++ b/plink.c @@ -484,7 +484,7 @@ int main(int argc, char **argv) /* 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) {