Fix duplicate hook check

This commit is contained in:
LoveSy 2022-12-07 21:12:40 +08:00
parent 5f8cf799c3
commit dea1626479
No known key found for this signature in database

View File

@ -146,7 +146,7 @@ public:
}
auto *the_addr = reinterpret_cast<uintptr_t *>(addr);
auto the_backup = *the_addr;
if (*the_addr != addr) {
if (*the_addr != callback) {
*the_addr = callback;
if (backup) *backup = the_backup;
__builtin___clear_cache(PageStart(addr), PageEnd(addr));