Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. === modified file 'dcpp/Util.cpp'
  2. --- dcpp/Util.cpp   2011-01-29 14:15:43 +0000
  3. +++ dcpp/Util.cpp   2011-02-11 11:29:34 +0000
  4. @@ -460,7 +460,7 @@
  5.         fileStart = authorityEnd;
  6.     }
  7.  
  8. -   protocol = url.substr(protoStart, protoEnd - protoStart);
  9. +   protocol = (protoEnd == string::npos ? Util::emptyString : url.substr(protoStart, protoEnd - protoStart));
  10.  
  11.     if(authorityEnd > authorityStart) {
  12.         dcdebug("x");
  13. @@ -499,7 +499,7 @@
  14.                 port = 80;
  15.             } else if(protocol == "https") {
  16.                 port = 443;
  17. -           } else if(protocol == "dchub") {
  18. +           } else if(protocol == "dchub" || protocol.empty()) {
  19.                 port = 411;
  20.             }
  21.         } else {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement