* Add safetyhook, remove libudis86
Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>
* Add modified CDetour
Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>
* Add CDetour [Safetyhook] to build script
* Re-enable loader/core/corelogic, and fix new C++20 error
* Reenable all extensions (except dhooks)
* Make cstrike compile against new CDetour
* Remove unused variable in sdktools output?
* Make sdktools compile against new cdetour
* Downgrade to C++17
* remove auto
* fix compilation on linux
* Re-enable dhooks
* Re-authorise old compilers
* Fix invalid downgrade of std::optional
* readd libudis86 for dhooks only
---------
Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Co-authored-by: bottiger1 <55270538+bottiger1@users.noreply.github.com>
On Linux if a detour crossed a page boundary we would only change the
memory protection of the first page (as we were aligning the address as
required, but not taking into account the length).
I don't have an easy way to test this but it looks correct. `addr + len`
doesn't appear to need to be aligned though, so another option could be
to use `(addr - startPage) + length` as len.
Also fixed a non-zero offset being passed into CDetour's ApplyPatch
function - this is never done internally anywhere, but it doesn't hurt
to fix it.
Fixes#984