1 parent 657a94f commit 70df0deCopy full SHA for 70df0de
1 file changed
src/serverlist.cpp
@@ -799,7 +799,11 @@ int CServerListManager::IndexOf ( const CHostAddress& haSearchTerm )
799
// (i.e., this server).
800
for ( int iIdx = ServerList.size() - 1; iIdx > 0; iIdx-- )
801
{
802
- if ( ServerList[iIdx].HostAddr4 == haSearchTerm )
+ if ( haSearchTerm.InetAddr.protocol() == QAbstractSocket::IPv4Protocol && ServerList[iIdx].HostAddr4 == haSearchTerm )
803
+ {
804
+ return iIdx;
805
+ }
806
+ if ( haSearchTerm.InetAddr.protocol() == QAbstractSocket::IPv6Protocol && ServerList[iIdx].HostAddr6 == haSearchTerm )
807
808
return iIdx;
809
}
0 commit comments