From 87eb2f98518a63a3f640b97ad62c8b18a5d6b946 Mon Sep 17 00:00:00 2001 From: gumi Date: Mon, 30 Jul 2018 11:55:45 -0400 Subject: always set the type when doing script->add_str --- src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/plugins/HPMHooking/HPMHooking_map.Hooks.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index f2ce1505c..d93557fe6 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -68339,6 +68339,33 @@ int HP_script_add_str(const char *p) { } return retVal___; } +int HP_script_add_variable(const char *varname) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_add_variable_pre > 0) { + int (*preHookFunc) (const char **varname); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_add_variable_pre[hIndex].func; + retVal___ = preHookFunc(&varname); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.add_variable(varname); + } + if (HPMHooks.count.HP_script_add_variable_post > 0) { + int (*postHookFunc) (int retVal___, const char *varname); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_add_variable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, varname); + } + } + return retVal___; +} const char* HP_script_get_str(int id) { int hIndex = 0; const char* retVal___ = NULL; -- cgit v1.2.3-70-g09d2