summaryrefslogtreecommitdiff
path: root/src/common/HPM.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-09-16 17:48:09 +0200
committerHaru <haru@dotalux.com>2015-10-11 00:24:22 +0200
commit502703d2b632125b35a2b8d341a90a13d7445f02 (patch)
tree365ad28c1875d71074e53d0860bd94c64b46b089 /src/common/HPM.c
parentaa6b8fd27b3c9b7c75f584434cc994ae9f9b044a (diff)
downloadhercules-502703d2b632125b35a2b8d341a90a13d7445f02.tar.gz
hercules-502703d2b632125b35a2b8d341a90a13d7445f02.tar.bz2
hercules-502703d2b632125b35a2b8d341a90a13d7445f02.tar.xz
hercules-502703d2b632125b35a2b8d341a90a13d7445f02.zip
Changed cmdline->args_data to a VECTOR
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/HPM.c')
-rw-r--r--src/common/HPM.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 454da9fbb..77c7e3fa2 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -347,9 +347,9 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, CmdlineExecF
return false;
}
- ARR_FIND(0, cmdline->args_data_count, i, strcmp(cmdline->args_data[i].name, name) == 0);
+ ARR_FIND(0, VECTOR_LENGTH(cmdline->args_data), i, strcmp(VECTOR_INDEX(cmdline->args_data, i).name, name) == 0);
- if (i < cmdline->args_data_count) {
+ if (i != VECTOR_LENGTH(cmdline->args_data)) {
ShowError("HPM:add_arg:%s duplicate! (from %s)\n",name,HPM->pid2name(pluginID));
return false;
}