From 6b547b1388e0c98d69efcaf1ea91e9b106dcf13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 7 Dec 2023 17:46:55 +0100 Subject: [PATCH] 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. --- src/engine/client/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 939abf42d..fdd46fee4 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -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);