From 8fc693abfb0ea1691782b95267b1ef05aa589d85 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Wed, 7 Nov 2012 21:45:11 -0500 Subject: [PATCH] Fixed core-legacy crash on hook from making wrong page writable (bug 5533, r=psychonic). --- core-legacy/sourcehook/sourcehook.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-legacy/sourcehook/sourcehook.cpp b/core-legacy/sourcehook/sourcehook.cpp index 40c4861..6a713fe 100644 --- a/core-legacy/sourcehook/sourcehook.cpp +++ b/core-legacy/sourcehook/sourcehook.cpp @@ -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(cur_vfnptr) = *reinterpret_cast(hookman->m_HookfuncVfnptr);