diff --git a/loader/include/Geode/utils/addresser.hpp b/loader/include/Geode/utils/addresser.hpp index f0025603..bf4ac936 100644 --- a/loader/include/Geode/utils/addresser.hpp +++ b/loader/include/Geode/utils/addresser.hpp @@ -10,6 +10,7 @@ #include #include #include +#include "../utils/casts.hpp" namespace geode::addresser { @@ -201,7 +202,7 @@ namespace geode::addresser { // do NOT delete the line below. // doing so breaks thunk adjusting on windows. // why? bruh idk - auto _ = *(ptrdiff_t*)(&func); + auto _ = *geode::cast::template union_cast(&func); return (F)((intptr_t)self + Addresser::thunkOf(func)); } @@ -210,7 +211,7 @@ namespace geode::addresser { // do NOT delete the line below. // doing so breaks thunk adjusting on windows. // why? bruh idk - auto _ = *(ptrdiff_t*)(&func); + auto _ = *geode::cast::template union_cast(&func); return (F)((intptr_t)self - Addresser::thunkOf(func)); } #endif