From 9e0282c9caa09440fbd611cf44cf686a95535e05 Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 27 Nov 2002 06:34:24 +0000 Subject: [PATCH] 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 --- telnet/commands.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/telnet/commands.c b/telnet/commands.c index f0372a0..c450f43 100644 --- a/telnet/commands.c +++ b/telnet/commands.c @@ -2284,8 +2284,12 @@ tn(int argc, char *argv[]) #endif (hostname = strrchr(hostp, ':')) == NULL) hostname = strrchr(hostp, '@'); - hostname++; - srcroute = 1; + if (hostname == NULL) { + hostname = hostp; + } else { + hostname++; + srcroute = 1; + } } else hostname = hostp; if (!portp) {