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()); |
|
} |
When a game host announces their game to the lobby, the message is supposed to set
GameInfo.isDirectConnectlike so:GeneralsGameCode/GeneralsMD/Code/GameEngine/Source/GameNetwork/LANAPI.cpp
Lines 717 to 718 in e2385c5
GeneralsGameCode/GeneralsMD/Code/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp
Lines 197 to 198 in e2385c5
The same should be done below, otherwise the game may read uninitialized memory when parsing this message:
GeneralsGameCode/GeneralsMD/Code/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp
Lines 67 to 68 in e2385c5
Additionally,
m_isDirectConnectshould probably be initialized in the constructor here:GeneralsGameCode/GeneralsMD/Code/GameEngine/Source/GameNetwork/LANGameInfo.cpp
Lines 89 to 100 in e2385c5