Skip to content

Always set isDirectConnect variable when announcing LAN game #1802

@Caball009

Description

@Caball009

When a game host announces their game to the lobby, the message is supposed to set GameInfo.isDirectConnect like so:

reply.GameInfo.inProgress = m_currentGame->isGameInProgress();
reply.GameInfo.isDirectConnect = m_currentGame->getIsDirectConnect();

reply.GameInfo.inProgress = m_currentGame->isGameInProgress();
reply.GameInfo.isDirectConnect = m_currentGame->getIsDirectConnect();

The same should be done below, otherwise the game may read uninitialized memory when parsing this message:

reply.GameInfo.inProgress = m_currentGame->isGameInProgress();

Additionally, m_isDirectConnect should probably be initialized in the constructor here:

LANGameInfo::LANGameInfo()
{
//Added By Sadullah Nader
//Initializtions missing and needed
m_lastHeard = 0;
m_next = NULL;
//
for (Int i = 0; i< MAX_SLOTS; ++i)
setSlotPointer(i, &m_LANSlot[i]);
setLocalIP(TheLAN->GetLocalIP());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working right, typically is user facingMinorSeverity: Minor < Major < Critical < BlockerNetworkAnything related to network, serversStabilityConcerns stability of the runtime

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions