Skip to content

Bugged sorting in GameSortStruct::operator() #967

Open
@xezon

Description

@xezon

Sorting logic is wrong in GameSortStruct::operator() with g2Good.

struct GameSortStruct
{
	bool operator()(GameSpyStagingRoom *g1, GameSpyStagingRoom *g2) const
	{
		// sort CRC mismatches to the bottom
		Bool g1Good = (g1->getExeCRC() != TheGlobalData->m_exeCRC || g1->getIniCRC() != TheGlobalData->m_iniCRC);
		Bool g2Good = (g1->getExeCRC() != TheGlobalData->m_exeCRC || g1->getIniCRC() != TheGlobalData->m_iniCRC); // <--- wrong
		if ( g1Good ^ g2Good )
		{
			return g1Good;
		}
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working right, typically is user facingGUIFor graphical user interfaceMinorSeverity: Minor < Major < Critical < BlockerNetworkAnything related to network, servers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions