diff options
Diffstat (limited to 'Swiften/Base/URL.cpp')
| -rw-r--r-- | Swiften/Base/URL.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Base/URL.cpp b/Swiften/Base/URL.cpp index 320e2ad..866cd45 100644 --- a/Swiften/Base/URL.cpp +++ b/Swiften/Base/URL.cpp @@ -36,25 +36,25 @@ URL URL::fromString(const std::string& urlString) { // Authority if (urlString.size() > colonIndex + 2 && urlString[colonIndex+1] == '/' && urlString[colonIndex+2] == '/') { size_t authorityIndex = colonIndex + 3; size_t slashIndex = urlString.find('/', authorityIndex); std::string authority; std::string path; if (slashIndex == std::string::npos) { authority = urlString.substr(authorityIndex); path = ""; } else { authority = urlString.substr(authorityIndex, slashIndex - authorityIndex); - path = unescape(urlString.substr(slashIndex + 1)); + path = unescape(urlString.substr(slashIndex)); } size_t atIndex = authority.find('@'); std::string userInfo; std::string hostAndPort; if (atIndex != std::string::npos) { userInfo = authority.substr(0, atIndex); hostAndPort = authority.substr(atIndex + 1); } else { userInfo = ""; hostAndPort = authority; |
Swift