registerSPForwardByName now automatically unregisters the forward again and returns -1 if the function is not found
This commit is contained in:
parent
5a80d24780
commit
54fb9fbfef
|
@ -300,6 +300,11 @@ int CForwardMngr::registerSPForward(int func, AMX *amx, int numParams, const For
|
||||||
pForward->Set(func, amx, numParams, paramTypes);
|
pForward->Set(func, amx, numParams, paramTypes);
|
||||||
m_SPForwards.push_back(pForward);
|
m_SPForwards.push_back(pForward);
|
||||||
}
|
}
|
||||||
|
if (pForward->getFuncsNum() == 0)
|
||||||
|
{
|
||||||
|
unregisterSPForward(retVal);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user