Fix incorrect map being loaded/downloaded

The `LoadMapSearch` function returns an error message or `nullptr` on success but the condition was incorrectly changed in #7580 so the opposite was checked instead.

Closes #7597.
This commit is contained in:
Robert Müller 2023-12-07 17:46:55 +01:00
parent 65641763c1
commit 6b547b1388

View file

@ -1402,7 +1402,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
pMapUrl = m_aMapDetailsUrl[0] ? m_aMapDetailsUrl : nullptr;
}
if(LoadMapSearch(pMap, pMapSha256, MapCrc) != nullptr)
if(LoadMapSearch(pMap, pMapSha256, MapCrc) == nullptr)
{
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "loading done");
SetLoadingStateDetail(IClient::LOADING_STATE_DETAIL_SENDING_READY);