Skip to content

Commit

Permalink
[BUGFIX] In module cache: use GetTickCount instead of GetTickCount64 …
Browse files Browse the repository at this point in the history
…- backward compat (Issue #42)
  • Loading branch information
hasherezade committed Apr 25, 2023
1 parent 3a3f5a2 commit 8a91bb8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scanners/module_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace pesieve

memcpy(moduleData, _moduleData, _moduleSize);
moduleSize = _moduleSize;
lastUsage = GetTickCount64();
lastUsage = GetTickCount();
}

BYTE* mapFromCached(size_t &mappedSize) const
Expand All @@ -90,7 +90,7 @@ namespace pesieve

BYTE* moduleData;
size_t moduleSize;
ULONGLONG lastUsage;
DWORD lastUsage;
};


Expand Down Expand Up @@ -125,7 +125,7 @@ namespace pesieve
CachedModule* cached = itr->second;
if (!cached) return nullptr;

cached->lastUsage = GetTickCount64();
cached->lastUsage = GetTickCount();
return cached->mapFromCached(mappedSize);
}
return nullptr;
Expand All @@ -143,8 +143,8 @@ namespace pesieve

bool _deleteLeastRecent()
{
ULONGLONG lTimestamp = 0;
ULONGLONG gTimestamp = 0;
DWORD lTimestamp = 0;
DWORD gTimestamp = 0;
std::map<std::string, CachedModule*>::iterator foundItr = cachedModules.end();

std::map<std::string, CachedModule*>::iterator itr;
Expand Down

0 comments on commit 8a91bb8

Please sign in to comment.