diff options
Diffstat (limited to 'src/util/strencodings.cpp')
-rw-r--r-- | src/util/strencodings.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/strencodings.cpp b/src/util/strencodings.cpp index f3d54a2ac9..e9d85c4c30 100644 --- a/src/util/strencodings.cpp +++ b/src/util/strencodings.cpp @@ -107,7 +107,8 @@ std::vector<unsigned char> ParseHex(const std::string& str) return ParseHex(str.c_str()); } -void SplitHostPort(std::string in, int &portOut, std::string &hostOut) { +void SplitHostPort(std::string in, uint16_t& portOut, std::string& hostOut) +{ size_t colon = in.find_last_of(':'); // if a : is found, and it either follows a [...], or no other : is in the string, treat it as port separator bool fHaveColon = colon != in.npos; |