X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/3f2ce694f2fea9da9b09dc80f07c3f2267759154..5dd103a89c5b260320b322e17d125e1cf620c5bd:/unix/uxplink.c diff --git a/unix/uxplink.c b/unix/uxplink.c index ee446ece..d144cb9f 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -471,7 +471,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) {