mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 23:34:15 +00:00
(svn r23202) -Fix [FS#4829]: unstable sorting in the network list when two servers had the exact same name
This commit is contained in:
parent
924a5e06b3
commit
aa668ba6bd
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user