1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-23 16:54:14 +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 86e9edff07
commit 8fc693abfb

View File

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