corrected issue am44595
This commit is contained in:
parent
751e8e6299
commit
4599b59834
|
@ -3777,7 +3777,9 @@ static cell AMX_NATIVE_CALL CreateMultiForward(AMX *amx, cell *params)
|
|||
cell ps[FORWARD_MAX_PARAMS];
|
||||
cell count = params[0] / sizeof(cell);
|
||||
for (cell i=3; i<=count; i++)
|
||||
{
|
||||
ps[i-3] = *get_amxaddr(amx, params[i]);
|
||||
}
|
||||
|
||||
return registerForwardC(funcname, static_cast<ForwardExecType>(params[2]), ps, count-2);
|
||||
}
|
||||
|
@ -3785,13 +3787,24 @@ static cell AMX_NATIVE_CALL CreateMultiForward(AMX *amx, cell *params)
|
|||
static cell AMX_NATIVE_CALL CreateOneForward(AMX *amx, cell *params)
|
||||
{
|
||||
CPluginMngr::CPlugin *p = g_plugins.findPlugin(params[1]);
|
||||
|
||||
if (!p)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid plugin id: %d", params[1]);
|
||||
return -1;
|
||||
} else if (!p->isExecutable(0)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int len;
|
||||
char *funcname = get_amxstring(amx, params[2], 0, len);
|
||||
|
||||
cell ps[FORWARD_MAX_PARAMS];
|
||||
cell count = params[0] / sizeof(cell);
|
||||
for (cell i=3; i<=count; i++)
|
||||
{
|
||||
ps[i-3] = *get_amxaddr(amx, params[i]);
|
||||
}
|
||||
|
||||
return registerSPForwardByNameC(p->getAMX(), funcname, ps, count-2);
|
||||
}
|
||||
|
|
|
@ -1004,10 +1004,10 @@ native set_addr_val(addr, val);
|
|||
native CreateMultiForward(const name[], stop_type, ...);
|
||||
|
||||
/**
|
||||
* creates a forward for one plugin.
|
||||
* results will be > 0 for success
|
||||
* id can be returned from find_plugin_byfile or
|
||||
* anything get_plugin is compatible with.
|
||||
* Creates a forward for one plugin.
|
||||
* Results will be > 0 for success.
|
||||
* id should be an id such as returned by find_plugin_byfile.
|
||||
* Unlike get_plugin(), negative numbers will not work.
|
||||
*/
|
||||
native CreateOneForward(plugin_id, const name[], ...);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user