(svn r23202) -Fix [FS#4829]: unstable sorting in the network list when two servers had the exact same name
This commit is contained in:
@@ -281,7 +281,8 @@ protected:
|
|||||||
/** Sort servers by name. */
|
/** Sort servers by name. */
|
||||||
static int CDECL NGameNameSorter(NetworkGameList * const *a, NetworkGameList * const *b)
|
static int CDECL NGameNameSorter(NetworkGameList * const *a, NetworkGameList * const *b)
|
||||||
{
|
{
|
||||||
return strnatcmp((*a)->info.server_name, (*b)->info.server_name); // Sort by name (natural sorting).
|
int r = strnatcmp((*a)->info.server_name, (*b)->info.server_name); // Sort by name (natural sorting).
|
||||||
|
return r == 0 ? (*a)->address.CompareTo((*b)->address) : r;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user