mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-25 02:00:54 +00:00
Fixed: Empty const char* because std::string destructor called
This commit is contained in:
parent
88507cf9ce
commit
be05bc3590
1 changed files with 5 additions and 5 deletions
|
@ -780,12 +780,12 @@ bool CInetAddress::is127001 () const
|
||||||
|
|
||||||
bool CInetAddress::isLoopbackIPAddress () const
|
bool CInetAddress::isLoopbackIPAddress () const
|
||||||
{
|
{
|
||||||
const char *sIPAddress = ipAddress().c_str();
|
std::string sIPAddress = ipAddress();
|
||||||
|
|
||||||
return (strcmp(sIPAddress, "::") == 0) ||
|
return (sIPAddress.compare("::") == 0) ||
|
||||||
(strcmp(sIPAddress, "::1") == 0) ||
|
(sIPAddress.compare("::1") == 0) ||
|
||||||
(strcmp(sIPAddress, "127.0.0.1") == 0) ||
|
(sIPAddress.compare("127.0.0.1") == 0) ||
|
||||||
(strcmp(sIPAddress, "0:0:0:0:0:0:0:1") == 0);
|
(sIPAddress.compare("0:0:0:0:0:0:0:1") == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue