core-legacy/sourcehook/sourcehook.cpp
changeset 767 fd3ff8d792ce
parent 659 b35a5fdbc654
child 812 4e9a2779bb2d
     1.1 --- a/core-legacy/sourcehook/sourcehook.cpp	Sat Oct 08 16:29:03 2011 -0700
     1.2 +++ b/core-legacy/sourcehook/sourcehook.cpp	Sat Oct 15 22:16:50 2011 -0700
     1.3 @@ -366,7 +366,7 @@
     1.4  			CVfnPtr vfp(cur_vfnptr, &m_OneIgnore);
     1.5  
     1.6  			// Alter vtable entry
     1.7 -			if (!SetMemAccess(cur_vtptr, sizeof(void*) * (tmp.m_VtblIdx + 1), SH_MEM_READ | SH_MEM_WRITE))
     1.8 +			if (!MakePageWritable(cur_vtptr))
     1.9  				return 0;
    1.10  
    1.11  			*reinterpret_cast<void**>(cur_vfnptr) = *reinterpret_cast<void**>(hookman->m_HookfuncVfnptr);