From f9da6d72e11de517820a5e4c3ce5c87361011195 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sat, 18 Jan 2025 18:28:07 +0300 Subject: [PATCH] Fix reading links when the graph version is different from retail (#507) --- dlls/nodes.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/nodes.cpp b/dlls/nodes.cpp index 28fc7144f..74565ebaa 100644 --- a/dlls/nodes.cpp +++ b/dlls/nodes.cpp @@ -2475,7 +2475,10 @@ int CGraph::FLoadGraph( const char *szMapName ) length -= sizeof(CLink_Retail) * m_cLinks; if( length < 0 ) goto ShortFile; - reinterpret_cast(pMemFile) -> copyOverTo(m_pLinkPool); + for (int j = 0; j < m_cLinks; ++j) + { + reinterpret_cast(pMemFile + sizeof(CLink_Retail) * j) -> copyOverTo(m_pLinkPool + j); + } pMemFile += sizeof(CLink_Retail) * m_cLinks; } #endif