1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-11-29 11:24:19 +01:00

Fixed core-legacy crash on hook from making wrong page writable (bug 5533, r=psychonic).

This commit is contained in:
Pavol Marko 2012-11-07 21:45:11 -05:00
parent 26b7b3b385
commit 0edf8d1691

View File

@ -366,7 +366,7 @@ namespace SourceHook
CVfnPtr vfp(cur_vfnptr, &m_OneIgnore);
// Alter vtable entry
if (!MakePageWritable(cur_vtptr))
if (!MakePageWritable(cur_vfnptr))
return 0;
*reinterpret_cast<void**>(cur_vfnptr) = *reinterpret_cast<void**>(hookman->m_HookfuncVfnptr);