Merge argument parsing changes into this copy of telnet.

Submitted by:	markm
Approved by:	bmah


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@107299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
eric 2002-11-27 06:34:24 +00:00
parent a2b2e46019
commit 9e0282c9ca

View File

@ -2284,8 +2284,12 @@ tn(int argc, char *argv[])
#endif #endif
(hostname = strrchr(hostp, ':')) == NULL) (hostname = strrchr(hostp, ':')) == NULL)
hostname = strrchr(hostp, '@'); hostname = strrchr(hostp, '@');
hostname++; if (hostname == NULL) {
srcroute = 1; hostname = hostp;
} else {
hostname++;
srcroute = 1;
}
} else } else
hostname = hostp; hostname = hostp;
if (!portp) { if (!portp) {