summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking.c
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirpojee@rocketmail.com>2013-10-17 21:39:11 +0530
committerDastgir Pojee <dastgirpojee@rocketmail.com>2013-10-17 21:39:11 +0530
commitb2c9f9de564065019684fcf22ed020b943fc5bbe (patch)
treed27ede8e334382211743c1e34a73a9db67778d38 /src/plugins/HPMHooking.c
parent97979fe1e577aebe77e978c248a08b33b2c0c1a2 (diff)
parent9128feccf3bddda94a7f8a170305565416815b40 (diff)
downloadhercules-b2c9f9de564065019684fcf22ed020b943fc5bbe.tar.gz
hercules-b2c9f9de564065019684fcf22ed020b943fc5bbe.tar.bz2
hercules-b2c9f9de564065019684fcf22ed020b943fc5bbe.tar.xz
hercules-b2c9f9de564065019684fcf22ed020b943fc5bbe.zip
Merge remote-tracking branch 'upstream/master' into SkidConst
Diffstat (limited to 'src/plugins/HPMHooking.c')
-rw-r--r--src/plugins/HPMHooking.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index 8b4f06ae0..1ca5b5f3c 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -53,8 +53,7 @@ HPExport struct hplugin_info pinfo = {
HPM_VERSION, // HPM Version (don't change, macro is automatically updated)
};
-#define HP_POP(x) #x , (void**)(&x)
-#define HP_POP2(x) (void*)x
+#define HP_POP(x,y) #x , (void**)(&x) , (void*)y , 0
DBMap *hp_db;/* hooking points db -- for quick lookup */
struct HookingPointData {
@@ -150,7 +149,7 @@ void HPM_HP_final(void) {
void HPM_HP_load(void) {
#include "../plugins/HPMHooking/HPMHooking.HookingPoints.inc"
- int i, len = ARRAYLENGTH(HookingPoints);
+ int i, len = ARRAYLENGTH(HookingPoints), idx = 0;
memset(&HPMHooks,0,sizeof(struct HPMHooksCore));
@@ -163,6 +162,9 @@ void HPM_HP_load(void) {
memcpy(hpd, &HookingPoints[i], sizeof(struct HookingPointData));
+ hpd->idx = idx;
+ idx += 2;
+
strdb_put(hp_db, HookingPoints[i].name, hpd);
HPMHooks.data.total++;