sourcemod/public/CDetour
Asher Baker 5b7c9c5845
Handle detour patches across page boundaries ()
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 
2021-07-17 20:53:25 +01:00
..
detourhelpers.h Handle detour patches across page boundaries () 2021-07-17 20:53:25 +01:00
detours.cpp Clarify detour creation errors () 2020-02-26 19:14:51 +00:00
detours.h Add DETOUR_DECL_* marcos for more parameter counts () 2016-11-29 14:55:39 -08:00