(svn r23202) -Fix [FS#4829]: unstable sorting in the network list when two servers had the exact same name

This commit is contained in:
rubidium 2011-11-12 19:26:53 +00:00
parent 924a5e06b3
commit aa668ba6bd

View File

@ -281,7 +281,8 @@ protected:
/** Sort servers by name. */
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;
}
/**