From 6177c1ebe758fbe32d2bd577ab61ce88a883eb00 Mon Sep 17 00:00:00 2001 From: Marvin D <41352111+IcePixelx@users.noreply.github.com> Date: Thu, 22 Dec 2022 16:48:47 +0100 Subject: [PATCH] Fix deadlock detection when processing relations --- r5dev/rtech/rtech_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/rtech/rtech_utils.cpp b/r5dev/rtech/rtech_utils.cpp index 7d3a8363..a635e3fb 100644 --- a/r5dev/rtech/rtech_utils.cpp +++ b/r5dev/rtech/rtech_utils.cpp @@ -749,7 +749,7 @@ void RTech::PakProcessGuidRelationsForAsset(PakFile_t* pPak, RPakAssetEntry_t* p assetIdx++; // Check if we have a deadlock and report it if we have rtech_debug enabled. - if (bDebug && assetIdx > 0x40000) + if (bDebug && assetIdx >= 0x40000) { Warning(eDLL_T::RTECH, "Possible deadlock detected while processing asset '0x%-16llX' in pak '%-32s'. Uses: %-4i | assetIdxEntryGuid: '0x%-16llX' | currentGuid: '0x%-16llX'\n", pAsset->m_Guid, pPak->m_pszFileName, pAsset->m_nUsesCount, assetIdxEntryGuid, currentGuid); if (IsDebuggerPresent())