From 78288796e2d430596da4beb3adcae8af97e80f1d Mon Sep 17 00:00:00 2001 From: Amos Date: Sat, 11 Feb 2023 15:15:52 +0100 Subject: [PATCH] Fix bug in 'FindIntelCacheDesc' It never iterates over the static arrays. --- r5dev/tier0/cpu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/r5dev/tier0/cpu.cpp b/r5dev/tier0/cpu.cpp index 7b3787f5..e1289689 100644 --- a/r5dev/tier0/cpu.cpp +++ b/r5dev/tier0/cpu.cpp @@ -389,9 +389,10 @@ static void FindIntelCacheDesc(uint8_t nDesc, const IntelCacheDesc_t* pDesc, int { for (int i = 0; i < nDescCount; ++i) { - if (pDesc->nDesc == nDesc) + const IntelCacheDesc_t& desc = pDesc[i]; + if (desc.nDesc == nDesc) { - nCache = pDesc->nCacheSize; + nCache = desc.nCacheSize; nCacheDesc = nDesc; break; }