From 870ee59aaa2409e3ae60aa812788569939b05ccc Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Wed, 6 Jul 2022 09:01:46 +0100 Subject: [PATCH] use proper casts for class arrays --- PolygonDLL/Hooks/Context.cpp | 2 +- PolygonDLL/Hooks/Http.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PolygonDLL/Hooks/Context.cpp b/PolygonDLL/Hooks/Context.cpp index cc2966c..df01454 100644 --- a/PolygonDLL/Hooks/Context.cpp +++ b/PolygonDLL/Hooks/Context.cpp @@ -9,7 +9,7 @@ Context__requirePermission_t Context__requirePermission = (Context__requirePermi void __fastcall Context__requirePermission_hook(void* _this, void*, int permission, const char* operation) { - int identity = *(int*)_this; + int identity = ((int*)_this)[0]; if (!Context__isInRole(identity, permission)) { diff --git a/PolygonDLL/Hooks/Http.cpp b/PolygonDLL/Hooks/Http.cpp index 502c492..12e53ff 100644 --- a/PolygonDLL/Hooks/Http.cpp +++ b/PolygonDLL/Hooks/Http.cpp @@ -158,7 +158,7 @@ bool __fastcall Http__trustCheck_hook(const char* url) // no idea if thats a detours quirk (i doubt it) or if thats how its just actually handled // practically no url is ever going to be seven characters long so it doesn't really matter - url = *(char**)url; + url = ((char**)url)[0]; } std::string _url = std::string(url);