abort() now cancels a callfunc
This commit is contained in:
parent
9eb9839a46
commit
b57367dd30
|
@ -3216,6 +3216,13 @@ static cell AMX_NATIVE_CALL callfunc_begin_i(AMX *amx, cell *params)
|
||||||
if (!plugin)
|
if (!plugin)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (g_CallFunc_Plugin)
|
||||||
|
{
|
||||||
|
// scripter's fault
|
||||||
|
LogError(amx, AMX_ERR_NATIVE, "callfunc_begin called without callfunc_end");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (params[1] < 0)
|
if (params[1] < 0)
|
||||||
{
|
{
|
||||||
LogError(amx, AMX_ERR_NATIVE, "Public function %d is invalid", params[1]);
|
LogError(amx, AMX_ERR_NATIVE, "Public function %d is invalid", params[1]);
|
||||||
|
@ -3697,6 +3704,10 @@ static cell AMX_NATIVE_CALL amx_abort(AMX *amx, cell *params)
|
||||||
if (pPlugin)
|
if (pPlugin)
|
||||||
filename = pPlugin->getName();
|
filename = pPlugin->getName();
|
||||||
|
|
||||||
|
//we were in a callfunc?
|
||||||
|
if (g_CallFunc_Plugin == pPlugin)
|
||||||
|
g_CallFunc_Plugin = NULL;
|
||||||
|
|
||||||
if (fmt)
|
if (fmt)
|
||||||
LogError(amx, err, "[%s] %s", filename, fmt);
|
LogError(amx, err, "[%s] %s", filename, fmt);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user