mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2026-10-12 02:08:05 +08:00
feat(Protections): Block Indecent Exposure crash. (#683)
This commit is contained in:
1 parent
e3ce965aa9
commit
b7c40a4efd
5 files changed
+26
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#include "hooking.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
uint64_t hooks::invalid_decal(uintptr_t a1, int a2)
|
||||
{
|
||||
if (a1 && a2 == 2)
|
||||
//*(*(*(a1 + 0x48) + 0x30) + 0x2C8)
|
||||
if (const auto ptr = *reinterpret_cast<uintptr_t*>((a1 + 0x48)); ptr)
|
||||
if (const auto ptr2 = *reinterpret_cast<uintptr_t*>((ptr + 0x30)); ptr2)
|
||||
if (*reinterpret_cast<uintptr_t*>(ptr2 + 0x2C8) == 0)
|
||||
return 0;
|
||||
|
||||
return g_hooking->get_original<hooks::invalid_decal>()(a1, a2);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user