mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 07:07:32 +08:00
fix(pointer cache): cache version should be sensitive to field count (#1512)
This commit is contained in:
parent
e0bd043588
commit
56e21320e1
@ -22,7 +22,10 @@ namespace big
|
|||||||
{
|
{
|
||||||
static_assert(batch_hash > 0);
|
static_assert(batch_hash > 0);
|
||||||
|
|
||||||
cache_file.set_cache_version(batch_hash);
|
constexpr size_t field_count = (offset_of_cache_end_field - offset_of_cache_begin_field) / sizeof(void*);
|
||||||
|
constexpr auto cache_version = batch_hash + field_count;
|
||||||
|
|
||||||
|
cache_file.set_cache_version(cache_version);
|
||||||
|
|
||||||
const uintptr_t pointer_to_cacheable_data_start = reinterpret_cast<uintptr_t>(this) + offset_of_cache_begin_field;
|
const uintptr_t pointer_to_cacheable_data_start = reinterpret_cast<uintptr_t>(this) + offset_of_cache_begin_field;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user