From fc1ebb25973831317cae5956888b2921059c1ebd Mon Sep 17 00:00:00 2001 From: gocha Date: Tue, 10 Aug 2010 05:23:34 +0000 Subject: [PATCH] RAM Search: Fix counting of number of changes. --- src/drivers/win/ram_search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/win/ram_search.cpp b/src/drivers/win/ram_search.cpp index 92c72dc6..9a9c6e5b 100644 --- a/src/drivers/win/ram_search.cpp +++ b/src/drivers/win/ram_search.cpp @@ -309,11 +309,11 @@ void UpdateRegionT(const MemoryRegion& region, const MemoryRegion* nextRegionPtr if(i >= indexEnd+k) continue; int m = (j-k+sizeof(compareType)) & (sizeof(compareType)-1); - if(nextValidChange[m]+sizeof(compareType) <= i+sizeof(compareType)) // if we didn't already increase the change count for this entry + if(nextValidChange[m] <= i) // if we didn't already increase the change count for this entry { //if(s_numChanges[i-k] != 0xFFFF) s_numChanges[i-k]++; // increase the change count for this entry - nextValidChange[m] = i+sizeof(compareType); // and remember not to increase it again + nextValidChange[m] = i-k+sizeof(compareType); // and remember not to increase it again } } }