diff options
Diffstat (limited to 'src/options.cpp')
-rw-r--r-- | src/options.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/options.cpp b/src/options.cpp index 45db202..ff09229 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -250,6 +250,14 @@ bool Options::splitAndAddHostPort(std::string hostPort, ConnectToList& list) hostPort.erase(pos, 1); } + else { + pos = hostPort.find_first_of(":"); + if(pos != std::string::npos && pos == hostPort.find_last_of(":")) { + // an ':' has been found and it is the only one -> assuming port present + hasPort = true; + hostPort[pos] = '/'; + } + } if(hasPort) { std::stringstream tmp_stream(hostPort); |