X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fnet.cpp;h=5368261243595014d2bda63e08c9d9f6c684451a;hp=c4bd027de2dfec05d7d19efe329bcce651ef4fa2;hb=66116c3847eeb3f0619bc084d96f5add41a156c8;hpb=c43a9ea77db06b9d101f0551df373d417e5028af diff --git a/src/net.cpp b/src/net.cpp index c4bd027..5368261 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -159,14 +159,14 @@ bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const cha } if (pszKeyword == NULL) break; - if (strLine.find(pszKeyword) != -1) + if (strLine.find(pszKeyword) != string::npos) { strLine = strLine.substr(strLine.find(pszKeyword) + strlen(pszKeyword)); break; } } closesocket(hSocket); - if (strLine.find("<") != -1) + if (strLine.find("<") != string::npos) strLine = strLine.substr(0, strLine.find("<")); strLine = strLine.substr(strspn(strLine.c_str(), " \t\n\r")); while (strLine.size() > 0 && isspace(strLine[strLine.size()-1]))