summaryrefslogtreecommitdiffhomepage
path: root/cli-runopts.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli-runopts.c')
-rw-r--r--cli-runopts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli-runopts.c b/cli-runopts.c
index a6e2b06..62568b0 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -610,7 +610,11 @@ static void parse_hostname(const char* orighostarg) {
cli_opts.username = m_strdup(cli_opts.own_user);
}
- port = strchr(cli_opts.remotehost, '/');
+ port = strchr(cli_opts.remotehost, '#');
+ if (!port) {
+ // legacy separator
+ port = strchr(cli_opts.remotehost, '/');
+ }
if (port) {
*port = '\0';
cli_opts.remoteport = port+1;